1

I'm running a GNU Parallel command on a screen session. Unfortunately, I did not put an "&" at the end of the command to push it to the background. Hence I do not have access to the command line on my screen session.

I would like to TERMINATE parallel so that it stops creating new jobs but finishes currently running ones. I will need to do so outside the screen, but I don't think screen -X will work because the screen's command line isn't accepting new commands.

Thanks!

muru
  • 193,181
  • 53
  • 473
  • 722
Rmurphy
  • 245
  • 2
  • 12

1 Answers1

2

First: The standard way to fix a missing & is:

CTRL-Z
bg

That being said, you probably want to send GNU Parallel a SIGTERM. If you only run one instance, then this should do it:

killall -TERM parallel
Ole Tange
  • 1,650
  • 1
  • 13
  • 25
  • Thanks! I found that Perl seemed to be responsible for parallel., so I ran `killall -TERM perl` and got a message saying "no new jobs will be started, but waiting for 5 to finish." That sounds like the desired result. Also, thanks for the info on CTRL-Z! I thought Control-Z was basically the same as Control-C and didn't know "stopped" really meant "paused." – Rmurphy Nov 17 '17 at 23:24