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

nohup can only works for a while #445

Open
fredericky123 opened this issue Dec 7, 2023 · 2 comments
Open

nohup can only works for a while #445

fredericky123 opened this issue Dec 7, 2023 · 2 comments

Comments

@fredericky123
Copy link

Related issue: #372
nohup ./script.sh && Anycommand can works for a while, however, after several minutes the command stops althouth the loop shouldn't stop

the content of script is:
LD_PRELOAD=$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1 FAKETIME="2020-01-01 00:00:00" command

@wolfcw
Copy link
Owner

wolfcw commented Dec 12, 2023

Could you please post a complete example showing that effect? I don't see the loop you mentioned. It'd be also helpful to have a concrete example of a command where this happens.

@fredericky123
Copy link
Author

fredericky123 commented Dec 13, 2023

It's surprising I find an alternative way.
The command below works correctly:
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1 FAKETIME="2020-01-01 00:00:00" FAKETIME_STOP_AFTER_SECONDS=1 nohup COMMAND

However, if I create a .sh file contains:LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1 FAKETIME="2020-01-01 00:00:00" FAKETIME_STOP_AFTER_SECONDS=1
Then I run nohup ./script.sh && COMMAND
The syntax stopped due to unknown errors.

I will use the alternative way.

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

No branches or pull requests

2 participants