Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
It is probably in a zombie state. The kernel will get rid of it. Another possibility is that you use selinux and the security settings don't even allow root to kill the process.
By the way, you can use "sudo" instead of logging in as root.
I'm not at my Linux computer right now, and I'm not sure what the "?" state is for. If memory serves, it is for an "unknown" state that should be temporary. A zombie process will show a state of "Z". You should learn how this service should be shut down properly. For example, on SuSE, I would use an rc script to shut down a service, as in "sudo /usr/sbin/rccups stop" to shut down the cupsd daemon. On other distro's you can use the init.d/ script with a shutdown argument.
If you do need to use the kill command to stop a program, it is better to use either the "-s SIGQUIT" or "-s SIGHUP" signals instead of -s SIGKILL. How is the "webservd" service started. There is probably an /etc/init.d/webservd script that you should use to shut it down.
In your case if the "?" state isn't temporary, you might need to reboot. You may have abruptly killed other services or programs in the past and have orphaned memory that can be freed.
The process with the PID of 1 will be the init process. You don't want to kill that. You shouldn't be killing processes. You should shut them down the way they are designed to be shut down. Usually via a script command with a "stop" argument. That way it can shut down gracefully, including all of the dependent processes.
Take a look at the "signals" manpage. It lists what signals you can send. Sending the SIGQUIT signal is a more "polite" way of ending processes.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.