Skip to content
Snippets Groups Projects
Commit f6fc1b02 authored by Dirk Zimoch's avatar Dirk Zimoch
Browse files

do not exec scripts by default after iocInit

parent 0bfb7b4b
No related branches found
No related tags found
No related merge requests found
...@@ -866,8 +866,8 @@ int runScript(const char* filename, const char* args) ...@@ -866,8 +866,8 @@ int runScript(const char* filename, const char* args)
if (interruptAccept) if (interruptAccept)
{ {
fprintf(stderr, "Warning: running %s\n", filename); fprintf(stderr, "Warning: Running script %s after iocInit may crash the ioc later.\n",
fprintf(stderr, "Warning: running scripts after iocInit may crash the ioc.\n"); filename);
} }
pairs = (char*[]){ "", "environ", NULL, NULL }; pairs = (char*[]){ "", "environ", NULL, NULL };
...@@ -1354,13 +1354,18 @@ loadlib: ...@@ -1354,13 +1354,18 @@ loadlib:
) )
{ {
if (args) if (args)
printf("Executing script %s with \"%s\"\n", filename, args); printf("Executing %s with \"%s\"\n", filename, args);
else if (interruptAccept)
{
printf("Not executing %s after iocInit\n", filename);
return 0;
}
else else
printf("Executing script %s\n", filename); printf("Executing %s\n", filename);
if (runScript(filename, args) != 0) if (runScript(filename, args) != 0)
fprintf (stderr, "Error executing %s\n", filename); fprintf (stderr, "Error executing %s\n", filename);
else else
printf("Done with script %s\n", filename); printf("Done with %s\n", filename);
} }
return status; return status;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment