I have searched everywhere for the answer to this question, so my apologies if I missed it somewhere on this forum.
I'm looking to create a subprocess when my Golang executable launches. This is no different than calling the fork() function in C.
In fact, the following code represents exactly what I want to do in Go:
#include <stdio.h>
#include <stdlib.h>
int main() {
int pid = fork();
if (pid == 0) {
printf("This is the child process.\n");
}
else {
printf("This is the parent process.\n");
}
return 0;
}
Any assistance would be greatly appreciated!
Thanks,
Adam