You can spin it off with 

   nohup yourcommand &

I personally always keep handy a little "detach" program that 
effectively does the same thing, while also severing your 
standard IO connections and dropping your control TTY. Here's
the source:

#include <types.h>
#include <unistd.h>
#include <fcntl.h>
#include <ioctls.h>

main(int ac, char **av) {
        int i;
        for (i = 0; close(i) == 0; ++i);
        i = open("/dev/tty", O_RDONLY);
        ioctl(i, TIOCNOTTY, (int *) 0);
        close(i);
        open("/dev/null", O_RDONLY);
        open("/dev/null", O_WRONLY);
        open("/dev/null", O_WRONLY);
        if (fork() == 0)
                execvp(av[1], av + 1);
}


Then you can just say

  detach yourprogram


Mike McNally | Turtle, turtle, on the ground,
[EMAIL PROTECTED] | Pink and shiny, turn around.

> -----Original Message-----
> From: Barton Hodges [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 09, 2000 11:28 AM
> To: [EMAIL PROTECTED]
> Subject: command to keep job running after logout?
> 
> 
> I seem to have forgotten what the command
> was to keep a job running even after I log
> out of the console... can anyone help?
> 
> Thanks.
> 
> 
> -- 
> To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
> as the Subject.
> 


-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to