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:
Mon, 5 May 2008 07:12:44 +1000
Content-Type:
text/plain
Parts/Attachments:
text/plain (68 lines)
Jérôme,

May the following command will help you

nohup /path/to/your/program > output.txt 2>&1 &

Cheers
Alex

Quoting Alex Kruchkoff <[log in to unmask]>:

> No, not really. It does not related to the computer, it's related to your
> program [or program environment]
> 
> you can read about programming in unix environment [forking processes,
> session
> leaders, controlling terminals etc...] in 
> 
> http://www.kohala.com/start/apue.html
> 
> Or any other good book on unix
> 
> cheers
> 
> 
> Quoting Jérôme Roccaz <[log in to unmask]>:
> 
> > Thanks for your answer Alex,
> > 
> > so If I understand it well, I should configure my workstation as a 
> > server ... even if it is not connected to a network.
> > 
> > Alex Kruchkoff a écrit :
> > > 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