X-Spam-Check-By: sourceware.org Date: Wed, 14 Jun 2006 11:16:47 -0400 (EDT) From: Igor Peshansky Reply-To: cygwin AT cygwin DOT com To: Rich Chase cc: cygwin AT cygwin DOT com Subject: Re: cygrunsrv: error while starting PRNGD service In-Reply-To: <448FA458.8060500@engr.colostate.edu> Message-ID: References: <448FA458 DOT 8060500 AT engr DOT colostate DOT edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: 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 On Tue, 13 Jun 2006, Rich Chase wrote: > I compiled PRNGD against cygwin and installed it as a cygrunsrv service. > > When I try to start the service, I get the infamous: > > "Could not start the PRNGD service on Local Computer. The service did > not return an error. This could be an internal Windows error or an > internal service error. If the problem persists, contact your system > administrator." This message is usually an indication that you are trying to run a daemon-type program (one that forks off the actual daemon and returns) with cygrunsrv. The whole intent of cygrunsrv is to take a program that needs to run continuously in the foreground, and turn it into a daemon. > However, I am running sshd as a service, and vnc as well -- both using > cygrunsrv. Notice that you needed to give the -D option to sshd to prevent it from going into the daemon mode. > I also am able to run prngd.exe manually without any errors or log > output. It successfully generates random numbers, as verified by the egd > testing perl script, and it does not terminate prematurely. Ah, but does it run from the SYSTEM account? > PRNGD does start an "entropy gatherer" program, which returns and > terminates. Could this child process's termination and return value be > causing cygrunsrv to 'think' that prngd.exe runs and then terminates? If > it did, would prngd.exe still be running (it isn't)? Not likely. > Everything seems to run fine, but doesn't start as a service. > Suggestions Please? You have two options here: find out if there is a way to run PRNGD in non-daemon mode (via a command-line option, for example), or read about the --pidfile option to cygrunsrv. Dave may also be correct that this is a permission issue -- try starting a "SYSTEM-owned bash shell" (Google for it), and see if the program works from there. HTH, Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte." "But no -- you are no fool; you call yourself a fool, there's proof enough in that!" -- Rostand, "Cyrano de Bergerac" -- 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/