|
|
@@ -280,6 +280,17 @@ static void aisexec_mempool_init (void)
|
|
|
|
|
|
static void aisexec_tty_detach (void)
|
|
|
{
|
|
|
+ int lpc;
|
|
|
+ struct rlimit oflimits;
|
|
|
+
|
|
|
+ /*
|
|
|
+ * close all open files
|
|
|
+ */
|
|
|
+ getrlimit(RLIMIT_NOFILE, &oflimits);
|
|
|
+ for (lpc = 0; lpc < oflimits.rlim_cur; lpc++) {
|
|
|
+ close(lpc);
|
|
|
+ }
|
|
|
+
|
|
|
/*
|
|
|
* Disconnect from TTY if this is not a debug run
|
|
|
*/
|