Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14520

Re: Add sleep builtin

From don fong <dfong@dfong.com>
Newsgroups gnu.bash.bug
Subject Re: Add sleep builtin
Date 2018-08-21 13:32 -0700
Message-ID <mailman.5379.1534883583.1292.bug-bash@gnu.org> (permalink)
References <CAJnmqwZ1GUZRtGRHt8xy_-tdTjVsAQKt-toGAEn5e9gjFrR0vQ@mail.gmail.com> <2801c537-6f5e-a727-49ab-7fb1bc8c32f8@case.edu> <d581b1b3-63fd-2804-1673-f1ce0962f66f@iki.fi> <CAJnmqwZCQdF0f0kPuknrKaN=y1JovnP7ViU4fVwjP58NDri7=w@mail.gmail.com>

Show all headers | View raw


wouldn't it be less confusing if the proposed built-in sleep function were
given a new name instead of overloading "sleep"?


On Tue, Aug 21, 2018 at 4:34 AM, konsolebox <konsolebox@gmail.com> wrote:

> On Tue, Aug 21, 2018 at 4:23 PM Ilkka Virta <itvirta@iki.fi> wrote:
> >
> > On 21.8. 02:35, Chet Ramey wrote:
> > > I don't think there's a problem with a `syntax conflict' as long as any
> > > builtin sleep accepts a superset of the POSIX options for sleep(1).
> >
> > The sleep in GNU coreutils accepts suffixes indicating minutes, hours
> > and days (e.g.  sleep 1.5m  or  sleep 1m 30s  for 90 seconds). I didn't
> > see support for those in konsolebox's patch, so while that's not
> > conflicting syntax per se, the lack of that option might trip someone.
>
> That was intended, and this patch is basically just a copy of the
> loadable version.  I don't really find it necessary to make the builtin
> sleep a complete copy of the external one.  The code would significantly
> increase if we add a parser for those formats.  Also it's basically
> people's fault for not reading documentation.  One should be aware
> enough if they enable the builtin.  Mksh's sleep also does the same.
>
> Anyway I respect whatever Chet decides it to become.
>
> --
> konsolebox
>
>

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: Add sleep builtin don fong <dfong@dfong.com> - 2018-08-21 13:32 -0700

csiph-web