From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 9 11:24:55 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B85B416A41F for ; Fri, 9 Sep 2005 11:24:55 +0000 (GMT) (envelope-from roam@ringlet.net) Received: from gandalf.online.bg (gandalf.online.bg [217.75.128.9]) by mx1.FreeBSD.org (Postfix) with SMTP id C108343D45 for ; Fri, 9 Sep 2005 11:24:53 +0000 (GMT) (envelope-from roam@ringlet.net) Received: (qmail 5497 invoked from network); 9 Sep 2005 11:24:49 -0000 Received: from unknown (HELO straylight.ringlet.net) (85.95.80.104) by gandalf.online.bg with SMTP; 9 Sep 2005 11:24:49 -0000 Received: (qmail 19540 invoked by uid 1000); 9 Sep 2005 14:24:52 +0300 Date: Fri, 9 Sep 2005 14:24:52 +0300 From: Peter Pentchev To: erkan kolemen Message-ID: <20050909112452.GB15059@straylight.m.ringlet.net> Mail-Followup-To: erkan kolemen , freebsd-hackers@freebsd.org References: <20050908194020.21635.qmail@web33415.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Bn2rw/3z4jIqBvZU" Content-Disposition: inline In-Reply-To: <20050908194020.21635.qmail@web33415.mail.mud.yahoo.com> User-Agent: Mutt/1.5.10i Cc: freebsd-hackers@freebsd.org Subject: Re: fok() execve() -> No child processes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2005 11:24:55 -0000 --Bn2rw/3z4jIqBvZU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 08, 2005 at 12:40:20PM -0700, erkan kolemen wrote: > Following code fails. I debugged it and saw that: it > produces "No child processes" error while wait(). >=20 > is it possible, parent still is not start to wait but > child finished. After that CPU schedules parents. It > try to start wait but child has finished. >=20 > is it possible... What can i do for that? [snip] > default: > if (wait(&stat) =3D=3D -1) { > slog(1, LOG_ERR); > return -14; > } Just an idea: what happens if you try waitpid(pid, &stat, 0) instead of wait(&stat)? G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@cnsys.bg roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 I've heard that this sentence is a rumor. --Bn2rw/3z4jIqBvZU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQFDIXEE7Ri2jRYZRVMRAqrSAJ9cot5I5Jk7RXcgf4QFJGO411LnZQCeLVlT xYxBHv/Z5+EDbXsRsJdEVUs= =Vh1f -----END PGP SIGNATURE----- --Bn2rw/3z4jIqBvZU--