Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com From: Kamen TOMOV Subject: Re: howto register process Date: 12 Nov 2004 15:06:51 +0200 Organization: CYBUILD Lines: 48 Message-ID: <87sm7fcj2s.fsf@zlatenlist.homelinux.net> References: <87u0rwury2 DOT fsf AT zlatenlist DOT homelinux DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet AT sea DOT gmane DOT org X-Gmane-NNTP-Posting-Host: 212-104-100-183.cable.evrocom.net X-Home-Page: http://www.cybuild.com User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 X-IsSubscribed: yes Hi, On Thu, Nov 11 2004, Dave Korn wrote: > Don't know if you just forgot to send this reply to the list as > well as to me, but see the first paragraph of > http://www.cygwin.com/ml/cygwin/2004-11/msg00424.html > for a list of reasons why to always send replies to the list. Yes, I'm sorry. I pressed R instead of F. Thank you for forwarding this to the list. > > > > The parent process is started as a windows server. Then it > > > > executes cygwin's fork. When I try to kill any of these with > > > > kill() it returns "No such pid". > > > > > > Does your username have sufficient privileges to kill > > > processes belonging to whichever user (perhaps SYSTEM, eh?) that > > > the server is running as? It might be a slightly bogus error > > > message from kill, when really it should have indicated "access > > > denied". > > > > I run all these as an Administrator. I tryed calling > > cygwin_winpid_to_pid(), which is part of the cygwin's api and it > > returns -1 when given a process not seen with "ps -ef". -1 means > > that it can't find such pid. > > > > > BTW, kill() doesn't return a const char *. I take it you're > > > referring to the value in errno after the call, and the error > > > message that perror () generates from that? Or are you > > > referring to the utility program /bin/kill? > > > > kill() prints int STDERR the error message - it is not returned by it. > > That strikes me as very very wrong indeed for a library function. > A quick scan through signal.cc doesn't seem to show anything in > kill, kill0, or kill_worker, that would have that effect, though as > always with C++, an awful lot of the detail can be hidden inside > implied constructors or overloaded operators. Are you _quite_ sure > you're calling cygwin's kill? I meant to say that kill.exe prints in the STDERR. Of course it is based on the kill() function. The function special functionality to keep track of errors. It uses set_errno(). Regards, -- Kamen TOMOV -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/