mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Valdis.Kletnieks@vt.edu
To: Harald Dunkel <harald.dunkel@t-online.de>
Cc: Andreas Jellinghaus <aj@dungeon.inka.de>, linux-kernel@vger.kernel.org
Subject: Re: block till hotplug is done?
Date: Tue, 05 Oct 2004 16:38:08 -0400	[thread overview]
Message-ID: <200410052038.i95Kc8VM004041@turing-police.cc.vt.edu> (raw)
In-Reply-To: Your message of "Tue, 05 Oct 2004 22:13:15 +0200." <4163005B.2090000@t-online.de>

[-- Attachment #1: Type: text/plain, Size: 811 bytes --]

On Tue, 05 Oct 2004 22:13:15 +0200, Harald Dunkel said:
> Andreas Jellinghaus wrote:
> > Hi,
> > 
> > is there any way to block till all hotplug events are handled/
> > the hotplug processes terminated?
> > 
> 
> while [ "`ps | grep /sbin/hotplug | grep -v grep`" ]; do sleep 1; done

Save a process:

while [ "`ps | grep '/sbin/[h]otplug'`" ]; do sleep 1; done

Depending on what exactly you're waiting on, you might also try:

while [ ! -b /dev/hdc1 ]; do sleep 1; done

(Assuming you know what device name you're expecting - this may depend on
the exact list of things that you want to do - there *might* be a race
condition where fdisk has created hd?1 but it's not the *right* one because
the media was previously partitioned and fdisk hasn't told the kernel to
read the new one yet. YMMV and all that...)

[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

  reply	other threads:[~2004-10-05 20:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-05 19:52 Andreas Jellinghaus
2004-10-05 20:13 ` Harald Dunkel
2004-10-05 20:38   ` Valdis.Kletnieks [this message]
2004-10-05 22:16     ` Jon Masters
2004-10-05 22:04   ` Andreas Jellinghaus
2004-10-06 14:19 ` Alexander E. Patrakov
2004-10-08 14:23 ` Greg KH

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=200410052038.i95Kc8VM004041@turing-police.cc.vt.edu \
    --to=valdis.kletnieks@vt.edu \
    --cc=aj@dungeon.inka.de \
    --cc=harald.dunkel@t-online.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®