r.sendecky
r.sendecky

Reputation: 10373

Sending posix signals with "signalProcess" function

I can not figure out how to convert integer process id to CPid type. I have a process id as a String and signal as Integer. I try to use signalProcess function to kill the process. signalProcess takes a Signal and ProcessID data types.

How do I convert integers to the above data types?

Upvotes: 1

Views: 160

Answers (1)

Daniel Fischer
Daniel Fischer

Reputation: 183968

CPid is an instance of Integral, as is Signal (which is CInt), so fromIntegral should do.

Upvotes: 3

Related Questions