Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: nohup not working #1036

Closed
green1052 opened this issue Oct 13, 2022 · 2 comments
Closed

Bug: nohup not working #1036

green1052 opened this issue Oct 13, 2022 · 2 comments

Comments

@green1052
Copy link

Describe the bug

Steps to reproduce

nohup archivebox update --resume=1665638787.247505 &

Screenshots or log output

    > /home/ubuntu/archivebox

Traceback (most recent call last):
  File "/usr/local/bin/archivebox", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/dist-packages/archivebox/cli/__init__.py", line 140, in main
    run_subcommand(
  File "/usr/local/lib/python3.10/dist-packages/archivebox/cli/__init__.py", line 80, in run_subcommand
    module.main(args=subcommand_args, stdin=stdin, pwd=pwd)    # type: ignore
  File "/usr/local/lib/python3.10/dist-packages/archivebox/cli/archivebox_update.py", line 117, in main
    filter_patterns_str = accept_stdin(stdin)
  File "/usr/local/lib/python3.10/dist-packages/archivebox/logging_util.py", line 128, in accept_stdin
    stdin_str = stdin.read()
OSError: [Errno 9] Bad file descriptor
[1]+  Exit 1                  nohup archivebox update --resume=1665638787.247505

ArchiveBox version

ArchiveBox v0.6.2
Cpython Linux Linux-5.15.0-1019-oracle-aarch64-with-glibc2.35 aarch64
IN_DOCKER=False DEBUG=False IS_TTY=True TZ=UTC SEARCH_BACKEND_ENGINE=ripgrep

[i] Dependency versions:
 √  ARCHIVEBOX_BINARY     v0.6.2          valid     /usr/local/bin/archivebox   
 √  PYTHON_BINARY         v3.10.6         valid     /usr/bin/python3.10         
 √  DJANGO_BINARY         v3.1.14         valid     /usr/local/lib/python3.10/dist-packages/django/bin/django-admin.py
 √  CURL_BINARY           v7.81.0         valid     /usr/bin/curl               
 √  WGET_BINARY           v1.21.2         valid     /usr/bin/wget               
 √  NODE_BINARY           v12.22.9        valid     /usr/bin/node               
 √  SINGLEFILE_BINARY     v1.0.13         valid     ./node_modules/single-file/cli/single-file
 -  READABILITY_BINARY    -               disabled  ./node_modules/readability-extractor/readability-extractor
 -  MERCURY_BINARY        -               disabled  ./node_modules/@postlight/mercury-parser/cli.js
 -  GIT_BINARY            -               disabled  /usr/bin/git                
 √  YOUTUBEDL_BINARY      v2021.12.17     valid     /usr/local/bin/youtube-dl   
 √  CHROME_BINARY         v106.0.5249.91  valid     /usr/bin/chromium-browser   
 √  RIPGREP_BINARY        v13.0.0         valid     /usr/bin/rg                 

[i] Source-code locations:
 √  PACKAGE_DIR           23 files        valid     /usr/local/lib/python3.10/dist-packages/archivebox
 √  TEMPLATES_DIR         3 files         valid     /usr/local/lib/python3.10/dist-packages/archivebox/templates
 -  CUSTOM_TEMPLATES_DIR  -               disabled                              

[i] Secrets locations:
 √  CHROME_USER_DATA_DIR  32 files        valid     ./chrome-profile            
 -  COOKIES_FILE          -               disabled                              

[i] Data locations:
 √  OUTPUT_DIR            9 files         valid     /home/ubuntu/archivebox     
 √  SOURCES_DIR           3 files         valid     ./sources                   
 √  LOGS_DIR              1 files         valid     ./logs                      
 √  ARCHIVE_DIR           668 files       valid     ./archive                   
 √  CONFIG_FILE           685.0 Bytes     valid     ./ArchiveBox.conf           
 √  SQL_INDEX             24.7 MB         valid     ./index.sqlite3             


@pirate
Copy link
Member

pirate commented Oct 26, 2022

Interesting edge case, haven't seen this before. Can probably just wrap stdin_str = stdin.read() in a try: ... except OSError: and ignore it for this case.

@yadayada
Copy link

One can run
nohup archivebox < /dev/null &

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants