Re: nohup in a korn shell

From: Bruce Harvey (BruceH@ROUTESCAPE.COM)
Date: Tue Mar 11 2003 - 09:02:10 EST


1. Permissions? Running as root?

2. If #1's ruled out, what commands are used by the cron script? If
they involve programs that "ASSume" that a terminal is connected, they may
be hanging up on either expected input or inability to produce output (like
the mksysb when it runs out of tape and asks for the second one ... Although
that's usually a complete failure).

Aside from that, and ASSuming that ALL of the environment variables
(including PATH) are properly set up, and ASSuming you're running as a
script shell you expect to run as (ksh, csh, etc.), then I know of nothing
else that will cause this problem.

-----Original Message-----
From: Basim Chafik [mailto:basimc@INVERA.COM]
Sent: Tuesday, March 11, 2003 8:50 AM
To: aix-l@Princeton.EDU
Subject: Re: [aix-l] nohup in a korn shell

All required variable are set. The script is working fine. It is just the
nohup when runs in cron does not release the script to continue

Basim Chafik

Senior Technology Consultant
IBM Certified Advanced Technical Expert - RS/6000 AIX
Invera Inc.

-----Original Message-----
From: John Dunn [mailto:john.dunn@SEFAS.CO.UK]
Sent: Tuesday, March 11, 2003 8:46 AM
To: aix-l@Princeton.EDU
Subject: Re: nohup in a korn shell

Does the script set up any required environment variables correctly? Jobs
started from cron may not have the users environment variables set

This may be causing your script to hang?

John

-----Original Message-----
From: Basim Chafik [mailto:basimc@INVERA.COM]
Sent: 11 March 2003 13:16
To: aix-l@Princeton.EDU
Subject: nohup in a korn shell

Hi,

I am having a problem with a shell script that uses nohup to start a
background process. This script run fine if I run it from the command line,
However, if I set it to run in cron the script will work and the nohup will
start the background process but the script will stop there. It will not
continue to the next steps in the script which is updating a log file. If I
check the processes with PS, I can see the script is still running and the
background process that nohup started successfully.

If any body have experienced this before, and can share or give me a hint.

Thanks.

Basim Chafik

Senior Technology Consultant
IBM Certified Advanced Technical Expert - RS/6000 AIX
Invera Inc.

****************************************************************************

This e-mail may be privileged and/or confidential, and the sender does not
waive any related rights and obligations. Any distribution, use or copying
of this e-mail or the information it contains by other than an intended
recipient is unauthorized. If you received this e-mail in error, please
advise me (by return e-mail or otherwise) immediately.

Ce courriel est confidentiel et protégé. L'expéditeur ne renonce pas aux
droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou
copie de ce message ou des renseignements qu'il contient par une personne
autre que le (les) destinataire(s) désigné(s) est interdite. Si vous recevez
ce courriel par erreur, veuillez m'en aviser immédiatement, par retour de
courriel ou par un autre moyen.

****************************************************************************

This e-mail may be privileged and/or confidential, and the sender does not
waive any related rights and obligations. Any distribution, use or copying
of this e-mail or the information it contains by other than an intended
recipient is unauthorized. If you received this e-mail in error, please
advise me (by return e-mail or otherwise) immediately.

Ce courriel est confidentiel et protégé. L'expéditeur ne renonce pas aux
droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou
copie de ce message ou des renseignements qu'il contient par une personne
autre que le (les) destinataire(s) désigné(s) est interdite. Si vous recevez
ce courriel par erreur, veuillez m'en aviser immédiatement, par retour de
courriel ou par un autre moyen.



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:38 EDT