On Friday 15 March 2013 21:54, Joshua Judson Rosen wrote: > I just noticed that trying to source a nonexistent file from a script running > (non-interactively) through ash causes the shell to exit. > > Debian's "dash" shell doesn't do this, and versions of bash before 4.2 > apparently don't do this even when invoked with "--posix" (it looks like > bash's > posix mode was always *supposed to* exit when trying to source non-existent > files, but was perhaps broken; bash's *default mode* doesn't exit when an > attempt is to source a nonexistent file, though). > > Looking at the code in busybox, it looks like there's an obvious patch that I > can make (cf. attached) in order to change this behaviour; does this change > make sense upstream? If I do it, should I predicate it on ENABLE_ASH_COMPAT, > or should I just do it unconditionally (I notice that busybox's > find_dot_file() > always searches in the current directory, which looks like a bashism)?
The patch is insufficient, it only cathes open errors, not failures to find the file. _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
