tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: siegelr () teleport ! com
To: tru64-unix-managers
Subject: What is correct way to exec /bin/csh for interactive mode
Date: Thu, 02 Mar 1995 04:03:29 +0000	[thread overview]
Message-ID: <96075318306359.tru64-unix-managers.marc@archive.invalid> (raw)

We have a program that we use to perform some "housekeeping" functions before 
users enter their /bin/csh shell.  Their /etc/passwd entry points to this 
program which execs /bin/csh after it's finished doing its housekeeping stuff. 
 It works fine on ULTRIX but when we tried it on OSF/1 V2.0 /bin/csh executes 
but doens't run the .login script.  /bin/csh apparently isn't executing in 
"interactive" mode.  What do we need to change to make it execute csh in 
interactive mode?

The following  C code fragment calls /bin/csh:

strcpy(argv[0],"-");
ipoint = envp;
do {
     if (strstr(*ipoint,"SHELL="))
       { 
          strcpy(*ipoint,"SHELL=/bin/csh"); break;
       }
    } while (*++ipoint);
execve("/bin/csh", argv, envp);

I assume it has something to do with the "-" but I'm not sure how it wants me 
to pass it.

Thanks in advance

Rich Siegel
siegelr@teleport.com 

                 reply	other threads:[~1995-03-02  4:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox