aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc/unix/run_erl.c
diff options
context:
space:
mode:
Diffstat (limited to 'erts/etc/unix/run_erl.c')
-rw-r--r--erts/etc/unix/run_erl.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/erts/etc/unix/run_erl.c b/erts/etc/unix/run_erl.c
index f8b5da47ab..6a92e18648 100644
--- a/erts/etc/unix/run_erl.c
+++ b/erts/etc/unix/run_erl.c
@@ -240,6 +240,7 @@ int main(int argc, char **argv)
int off_argv;
int calculated_pipename = 0;
int highest_pipe_num = 0;
+ int sleepy_child = 0;
program_name = argv[0];
@@ -250,6 +251,11 @@ int main(int argc, char **argv)
init_outbuf();
+ if (!strcmp(argv[1],"-sleepy-child")) { /* For test purpose only */
+ sleepy_child = 1;
+ ++i;
+ }
+
if (!strcmp(argv[1],"-daemon")) {
daemon_init();
++i;
@@ -392,6 +398,9 @@ int main(int argc, char **argv)
exit(1);
}
if (childpid == 0) {
+ if (sleepy_child)
+ sleep(1);
+
/* Child */
sf_close(mfd);
/* disassociate from control terminal */