Why Ubuntu 16.04 C++ program cannot programatically stop mono-service?
Karl Auer
kauer at biplane.com.au
Tue May 17 06:03:46 UTC 2016
On Tue, 2016-05-17 at 01:45 -0400, Frank Chang wrote:
> But when I run this C++ program, it is unable to stop the service.
Why is mono-service.exe in single AND double quotes? Get rid of the
single quotes.
What is the output from your program?
Likeliest other reason is permissions - are you running the program as
root?
What happens when you do not use the "-f" option?
Try to get the return value of the pkill program; it may have some
answers. And or redirect its output to a file for inspection.
All pkill does is send a signal to a process. You might be better off
locating that process ID (does mono-service.exe set a process ID in a
runfile or similar?) and sending a signal in C++ rather than running an
external program.
This is really a programming question, not an Ubuntu question.
Regards, K.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer
http://twitter.com/kauer389
GPG fingerprint: E00D 64ED 9C6A 8605 21E0 0ED0 EE64 2BEE CBCB C38B
Old fingerprint: 3C41 82BE A9E7 99A1 B931 5AE7 7638 0147 2C3C 2AC4
More information about the ubuntu-users
mailing list