TIP: Click on subject to list as thread! ANSI
echo: cis.languages
to: 76336,3226 (X)
from: Robert A. Larson 75126,723
date: 1990-11-04 22:11:13
subject: C help

#: 7996 S3/Languages
    04-Nov-90  22:11:13
Sb: C help
Fm: Robert A. Larson 75126,723
To:  76336,3226 (X)

Newsgroups: compuserve.os9.osk Subject: Re: Help with C References:
 Distribution: compuserve

In article  76336.3226@compuserve.com (MAS) writes:
>create and access a login shell >from within an OS-9 program.

On osk, a login shell starts with "-" in argv[0].  Also pay attention to the
enviornment you pass it.  (login creates PORT, HOME, SHELL, USER, and PATH, and
should but doesn't pass TZ along.)

pipe0 = open("/pipe", S_IREAD | S_IWRITE); pipe1 = open("/pipe", S_IREAD |
S_IWRITE); save0 = dup(0); save1 = dup(1); save2 = dup(2); close(0);
dup(pipe0); close(1); dup(pipe1); close(2); dup(pipe1); child =
os9exec(os9forkc, "shell", argv, envp, 0, 0, 3); close(0); dup(save0);
close(1); dup(save1); close(2); dup(save2);

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.