You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// This is a hacky fire-and forget implementation without setting any attributes, using pipes or checking for errors
38
+
// This function is a wrapper around the forkExec function, which is a wrapper around the fork and execve system calls.
39
+
// The StartProcess function creates a new process by forking the current process and then calling execve to replace the current process with the new process.
40
+
// It thereby replaces the newly created process with the specified command and arguments.
41
+
// Differences to upstream golang implementation (https://cs.opensource.google/go/go/+/master:src/syscall/exec_unix.go;l=143):
42
+
// * No setting of Process Attributes
43
+
// * Ignoring Ctty
44
+
// * No ForkLocking (might be introduced by #4273)
45
+
// * No parent-child communication via pipes (TODO)
46
+
// * No waiting for crashes child processes to prohibit zombie process accumulation / Wait status checking (TODO)
// in regular go this is where the forkExec thingy comes in play
85
+
// In Golang, the idiomatic way to create a new process is to use the StartProcess function.
86
+
// Since the Model of operating system processes in tinygo differs from the one in Golang, we need to implement the StartProcess function differently.
87
+
// The startProcess function is a wrapper around the forkExec function, which is a wrapper around the fork and execve system calls.
88
+
// The StartProcess function creates a new process by forking the current process and then calling execve to replace the current process with the new process.
89
+
// It thereby replaces the newly created process with the specified command and arguments.
0 commit comments