2 Copyright © 1995-2008, The AROS Development Team. All rights reserved.
5 Desc: EndCLI CLI command
9 /******************************************************************************
42 ******************************************************************************/
45 #include <proto/dos.h>
47 #include <dos/dosextens.h>
49 #include <aros/shcommands.h>
51 AROS_SH0(EndCLI
, 41.3)
55 struct CommandLineInterface
*cli
= Cli();
60 struct FileHandle
*fhin
= BADDR(cli
->cli_StandardInput
);
62 if (cli
->cli_CurrentInput
&& cli
->cli_CurrentInput
!= cli
->cli_StandardInput
) {
63 Close(cli
->cli_CurrentInput
);
64 cli
->cli_CurrentInput
= cli
->cli_StandardInput
;
67 cli
->cli_Background
= DOSTRUE
;
69 fhin
->fh_End
= 0; /* Simulate an EOF */
71 if (cli
->cli_Interactive
)
72 Printf("Task %ld ending\n", ((struct Process
*)FindTask(NULL
))->pr_TaskNum
);