home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d1xx
/
d111
/
poplife.lha
/
PopLife
/
crash.c
< prev
next >
Wrap
C/C++ Source or Header
|
1987-11-15
|
794b
|
31 lines
/* An attempt to close the Output() file provided by the CLI. */
/* It is not more than that - it doesn't work (Guru FreeTwice from DOS) */
extern struct CommandLineInterface *_argcli;
/* extern long Input(), Output(), FindTask(), IsInteractive, Open(), Close(); */
main()
{
long output, stdout, curout, nil;
struct Process *proc;
output = Output();
curout = _argcli->cli_CurrentOutput;
stdout = _argcli->cli_StandardOutput;
proc = FindTask(0L);
if (_argcli->cli_Background && IsInteractive(stdout)) {
Write(output, "Opening NIL:\n", 13L);
nil = Open("NIL:", MODE_OLDFILE);
Close(stdout);
_argcli->cli_StandardOutput = nil;
if (curout == stdout)
_argcli->cli_CurrentOutput = nil;
if (output == stdout) {
proc->pr_COS = nil;
}
proc->pr_ConsoleTask = 0;
}
}