Added cleanup for the external command stuff, so that the UNIX flavored
implementation can unlink the named pipe. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16145 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
64faaed88a
commit
51855db4b0
@ -11,6 +11,7 @@ extern "C" {
|
||||
|
||||
char *get_external_command(const char *prompt, char *input, int len);
|
||||
void reply_to_external_command(int result);
|
||||
void external_command_cleanup();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -95,3 +95,10 @@ reply_to_external_command(int result)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
external_command_cleanup()
|
||||
{
|
||||
// The port will be deleted automatically when the team exits.
|
||||
}
|
||||
|
@ -166,3 +166,10 @@ reply_to_external_command(int result)
|
||||
if (bytesWritten < 0)
|
||||
close_client_connection();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
external_command_cleanup()
|
||||
{
|
||||
unlink(kFSShellCommandSocketAddress);
|
||||
}
|
||||
|
@ -2165,6 +2165,9 @@ do_fsh(void)
|
||||
free(argv);
|
||||
}
|
||||
|
||||
if (!sInteractiveMode)
|
||||
external_command_cleanup();
|
||||
|
||||
if (feof(stdin))
|
||||
printf("\n");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user