Introduction
Introduction Statistics Contact Development Disclaimer Help
Fork off when starting sam from B. - sam - An updated version of the sam text e…
git clone git://vernunftzentrum.de/sam.git
Log
Files
Refs
LICENSE
---
commit 71aaff563cdaf41ce7029713cd05a1ed1dad70c4
parent 0677cef74fe4031e029131682a14838337d046c1
Author: Rob King <[email protected]>
Date: Wed, 11 Jan 2017 09:52:52 -0600
Fork off when starting sam from B.
Diffstat:
sam/sam.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/sam/sam.c b/sam/sam.c
@@ -126,7 +126,17 @@ bmain(int argc, char *argv[])
for (int i = 1; i < argc; i++)
nargv[i] = argv[i];
nargv[argc] = NULL;
- execvp("sam", nargv);
+ switch (fork()){
+ case 0:
+ execvp("sam", nargv);
+ break;
+
+ case -1:
+ return perror("could not fork"), EXIT_FAILURE;
+
+ default:
+ break;
+ }
}
memset(&un, 0, sizeof(un));
You are viewing proxied material from vernunftzentrum.de. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.