All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andris Pavenis <pavenis@latnet.lv>
To: alan@lxorguk.ukuu.org.uk, hiren_mehta@agilent.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: problem with devfsd compilation
Date: Thu, 1 Feb 2001 21:26:51 +0200	[thread overview]
Message-ID: <01020121265100.00537@hal> (raw)

>> I am trying to compile devfsd on my system running RedHat linux 7.0
>> (kernel 2.2.16-22). I get the error "RTLD_NEXT" undefined. I am not
>> sure where this symbol is defined. Is there anything that I am missing 
>> on my system. 
>
>
>Sounds like a missing include in the devfsd code. That comes from 
>dlfcn.h. 

Following small patch fixes this and workarounds devfs related problem
which appeared in 2.4.0-test12-pre8:
	when I'm logging out, devfsd tries to state /dev/vcc/[1-6] but sometimes
	fails perhaps due to some race in kernel. As result devfsd quits with 
	error message. Retrying to state node suceeds on next attempt.
	I don't know why it happens, but I guess it's related to 
	change in drivers/char/tty_io.c between test12-pre7 and pre8
	(change to use flush_scheduled_tasks())

Hint: it seems to be easier to reproduce on slower machine (it happens seldom 
	on PIII-700, but very often on P200MMX)

Andris


--- devfsd/devfsd.c~1	Mon Jul  3 22:43:07 2000
+++ devfsd/devfsd.c	Fri Jan 12 13:19:33 2001
@@ -189,6 +189,7 @@
 #include <signal.h>
 #include <regex.h>
 #include <errno.h>
+#define __USE_GNU
 #include <dlfcn.h>
 #include <rpcsvc/ypclnt.h>
 #include <rpcsvc/yp_prot.h>
@@ -918,15 +919,29 @@
     [RETURNS] Nothing.
 */
 {
+    int tries=0;
     mode_t new_mode;
     struct stat statbuf;
 
+Retry:   
     if (lstat (info->devname, &statbuf) != 0)
     {
-	SYSLOG (LOG_ERR, "error stat(2)ing: \"%s\"\t%s\n",
-		info->devname, ERRSTRING);
-	SYSLOG (LOG_ERR, "exiting\n");
-	exit (1);
+	if (tries<10)
+	{
+	   tries++;
+           SYSLOG (LOG_ERR, "error stat(2)ing: \"%s\"\t%s\n",
+	   	   info->devname, ERRSTRING);
+           SYSLOG (LOG_ERR, "retrying (attempt %d) ...\n",tries);
+	   usleep (1000);  /* Let's sleep a bit  */
+	   goto Retry;
+	}
+	else
+	{
+	   SYSLOG (LOG_ERR, "error stat(2)ing: \"%s\"\t%s\n",
+	   	   info->devname, ERRSTRING);
+	   SYSLOG (LOG_ERR, "exiting\n");
+	   exit (1);
+	}
     }
     new_mode = (statbuf.st_mode & S_IFMT) |
 	(entry->u.permissions.mode & ~S_IFMT);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

             reply	other threads:[~2001-02-06 10:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-01 19:26 Andris Pavenis [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-02-02  2:50 problem with devfsd compilation Frédéric L. W. Meunier
2001-02-02 14:46 ` Georg Nikodym
2001-02-01 18:37 hiren_mehta
2001-02-01 18:44 ` Georg Nikodym
2001-02-01 18:45 ` Alan Cox
2001-02-02  6:25   ` Michael B. Trausch
2001-02-01 18:52 ` Georg Nikodym
2001-02-02  8:21 ` Michael B. Trausch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=01020121265100.00537@hal \
    --to=pavenis@latnet.lv \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=hiren_mehta@agilent.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.