help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fuse


From: Greg Wooledge
Subject: Re: fuse
Date: Thu, 6 Apr 2023 07:40:07 -0400

On Thu, Apr 06, 2023 at 01:33:03PM +0200, lacsaP Patatetom wrote:
> I have a bash script that calls another bash script like this :
> device=$( other.script ) ||
>   exit 1
> 
> this other/sub script mounts a Windows partition and returns its path :
> mount /dev/sdXy /mnt &&
>   echo debug >> /dev/stderr &&
>     echo /dev/sdXy ||
>   exit 1
> 
> no problem when this partition is of FAT type.
> on the other hand, when this partition is of type exFAT or NTFS, the
> master script stops despite the display of the "debug".
> in these two cases, it is FUSE which takes part in the mounting of the
> partition : I thus suppose that it is at this level that the blocking
> intervenes...

You used the word "stops".  And then you used the word "blocking".  So,
you DON'T mean that the script crashes, right?  You mean that the script
"hangs" or "sits there doing nothing"?

> would someone have an explanation or encountered this problem ?

I would guess that the mount command produces a long-running child
process which inherits stdout from mount.  Since you didn't redirect
stdout anywhere, it's still attached to the pipe which is attached to
the command substitution in the caller.

If you redirect mount's output to /dev/null (or to a log file), does
that change anything?

Also, just for the record, ">>/dev/stderr" is a very strange way to
write ">&2".



reply via email to

[Prev in Thread] Current Thread [Next in Thread]