SCIENTIFIC-LINUX-USERS Archives

May 2008

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Alex Kruchkoff <[log in to unmask]>
Reply To:
Alex Kruchkoff <[log in to unmask]>
Date:
Fri, 2 May 2008 14:05:19 +1000
Content-Type:
text/plain
Parts/Attachments:
text/plain (27 lines)
To be able to continue to run your program  after you close the shell -- 
a parent for your program you should run it as a server [daemon].
Extra steps should be in your program [or outside of your program to 
setup sort of daemon environment]:

0) check that the same program is not running [ use a file with pid; 
remove when done ]
1) fork a child
2) exit if a parent;
3) change the current working directory to /
4) redirect output / error to a log file; read the input from another 
filechange the current working directory to /
5) become a session leader

Cheers

Jérôme Roccaz wrote, On 04/27/2008 02:17 AM:
> Hi evryone,
>
> I report a strange behaviour of my SL 5.1 : when I run a program, lock 
> my session and open a new one (I share my computer with my student), 
> the program is killed when I unlock my session.
> Same thing if I run the programm as batch and close my session.
>
> Is there something misconfigured?
>

ATOM RSS1 RSS2