[OE-core] [PATCH] busybox: update flock behavior to match upstream

Maxin B. John maxin.john at intel.com
Tue Jan 17 15:05:03 UTC 2017


Hi,

On Tue, Jan 17, 2017 at 12:59:37PM +0000, Phil Blundell wrote:
> On Thu, 2016-04-21 at 12:24 +0300, Maxin B. John wrote:
> > 
> +-
> > +-	if (argv[0])
> > +-		return spawn_and_wait(argv);
> > +-
> > ++    if (argv[0]) {
> > ++        cmd_args[0] = getenv("SHELL");
> > ++        if (!cmd_args[0])
> > ++            cmd_args[0] = (char*)DEFAULT_SHELL;
> > ++        cmd_args[1] = (char*)"-c";
> > ++        cmd_args[2] = argv[0];
> > ++        cmd_args[3] = NULL;
> > ++        return spawn_and_wait(cmd_args);
> > ++    }
> > + 	return EXIT_SUCCESS;
> > + }
> > 
> 
> This patch seems to completely break the behaviour of flock when
> invoked without "-c".  For example, compare the behaviour of:
> 
> flock /tmp/lock echo it works
> 
> before and after.  Please revert this patch until and unless it can be
> fixed.

My bad. Thanks for noticing this. Upstream accepted the patch with some
improvements to fix this:
https://git.busybox.net/busybox/commit/?id=e1d426fd65c00a6d01a10d85edf8a294ae8a2d2b

I will backport that patch and send it soon.

> p.

Best Regards,
Maxin



More information about the Openembedded-core mailing list