Re: [PATCH 3/3] execl() only returns in case of error

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

 



On Mon, 21 Jan 2013 14:22:58 +0100 Jes.Sorensen@xxxxxxxxxx wrote:

> From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx>
> 
> In case exec fails, fall through and print warning rather than just
> calling exit(1) silently.
> 
> Signed-off-by: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx>
> ---
>  util.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/util.c b/util.c
> index 500b2bd..68fd27e 100644
> --- a/util.c
> +++ b/util.c
> @@ -1705,7 +1705,6 @@ int start_mdmon(int devnum)
>  					}
>  				}
>  		}
> -		exit(1);
>  	case -1: pr_err("cannot run mdmon. "
>  			 "Array remains readonly\n");
>  		return -1;

???
Print the warning, and (still in the child) return to whoever called
start_mdmon()?  Not a good idea.

If we want an error when mdmon fails (might be a good idea) we should print
it after the 'wait' returns an error, not in the child.

Thanks,
NeilBrown

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux