As mentioned in the title.
I wrote a script that has pretty long execution time. Some user just close the window half way and in the end cause some file corrupted. Is there any way to prevent the user closing the window? (Like turn the 'x' button of the window title bar grey color?)
rinque 0 Newbie Poster
Recommended Answers
Jump to Postthere is no real way to stop a user from closing a window using a shell script.
but if your worring about your shell script being half way through something when they close the window.
use
nohup
this makes the process not honour hang up …
Jump to PostIf you don't want the user to notice the script running:
nohup script.sh <parameters> 2>&1 > ./logfile &
As long as your script does not ask for user input this will work. Otherwise you will have to resort to nohup and an expect script or nohup and …
All 8 Replies
shanenin 0 Posting Whiz in Training
Paul.Esson 53 Junior Poster
rinque 0 Newbie Poster
Paul.Esson 53 Junior Poster
hungtat 0 Newbie Poster
Paul.Esson 53 Junior Poster
jim mcnamara 19 Junior Poster
rashshell 0 Newbie Poster
Dukane commented: Your first and only post is bumping a topic that's three years old?? Come onnnnn.... +0
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.