Currently, I have one file calling another, and as an argument it passes over a pid converted into a string. Then, in a signal handler, I need to send a signal to the process given by the pid.
So I have:
//initialized as a global variable
pid_t* distantPid;
//in my main function
distantPid = &argv[1];
//then, in my signal handler
kill(*distantPid, WARNING_SIGNAL);
Whenever I try to compile this, though, I get an error saying 'Assignment from incompatible pointer type [assigned by default]'
I can't simply use argv[1] in the signal handler, because it's not in the main function.
Where am I going wrong?