Re: svn commit: r340478 - head/share/man/man7

2018-11-16 Thread Cy Schubert
In message , 
=?utf-8?Q?Edward
_Tomasz_Napiera=C5=82a?= writes:
> 
>
> > On 16 Nov 2018, at 18:40, Cy Schubert  wrote:
> > 
> > In message <201811161804.wagi44wc047...@pdx.rh.cn85.dnsmgr.net>, 
> > "Rodney W. Gri
> > mes" writes:
>  On Fri, Nov 16, 2018 at 7:29 AM Mateusz Piotrowski <0...@freebsd.org> wro
> te:
>  
>   A few years ago jilles@ proposed changing reboot's default to signallin
> >> g
>   init (preserving reboot -q which just invokes the reboot system call),
>  but
>   this was not accepted. Perhaps this can be tried again for 13.0.
>  
> >>> 
> >>> I didn't like it at the time, however I was wrong. Much of my reasoning f
> or
> >>> doing it has become muted as well since then, and the need to do it has
> >>> become more amplified as more rc scripts have grown shutdown
> >>> functionality...
> >>> 
> >>> I think if we make what's now reboot 'fastreboot' or 'reboot -q' (both of
> >>> which are historic replacements), we can make 'reboot' what's now 'shutdo
> wn
> >>> -r now'.
> >> 
> >> I support this position.
> > 
> > reboot(2) should be changed to signal init(8). RB_AUTOBOOT should 
> > signal init while a new RB_FASTBOOT or RB_LEGACY (or pick a name) would 
> > preserve traditional behavior. RB_POWEROFF, RB_POWERCYCLE and RB_HALT 
> > would also signal init except when RB_FASTBOOT flag is set.
>
> Wouldn’t this break rebooting when UID 1 is not init(8)?

You mean PID 1, right?

This would obviously require special case handling when the caller is 
PID 1.

Tangentially, though Linux vaguely documents RB_*, they document 
LINUX_REBOOT_* in their man page, which obviously doesn't work here.


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX: Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r340478 - head/share/man/man7

2018-11-16 Thread Edward Tomasz Napierała

> On 16 Nov 2018, at 18:40, Cy Schubert  wrote:
> 
> In message <201811161804.wagi44wc047...@pdx.rh.cn85.dnsmgr.net>, 
> "Rodney W. Gri
> mes" writes:
 On Fri, Nov 16, 2018 at 7:29 AM Mateusz Piotrowski <0...@freebsd.org> 
 wrote:
 
  A few years ago jilles@ proposed changing reboot's default to signallin
>> g
  init (preserving reboot -q which just invokes the reboot system call),
 but
  this was not accepted. Perhaps this can be tried again for 13.0.
 
>>> 
>>> I didn't like it at the time, however I was wrong. Much of my reasoning for
>>> doing it has become muted as well since then, and the need to do it has
>>> become more amplified as more rc scripts have grown shutdown
>>> functionality...
>>> 
>>> I think if we make what's now reboot 'fastreboot' or 'reboot -q' (both of
>>> which are historic replacements), we can make 'reboot' what's now 'shutdown
>>> -r now'.
>> 
>> I support this position.
> 
> reboot(2) should be changed to signal init(8). RB_AUTOBOOT should 
> signal init while a new RB_FASTBOOT or RB_LEGACY (or pick a name) would 
> preserve traditional behavior. RB_POWEROFF, RB_POWERCYCLE and RB_HALT 
> would also signal init except when RB_FASTBOOT flag is set.

Wouldn’t this break rebooting when UID 1 is not init(8)?

___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r340478 - head/share/man/man7

2018-11-16 Thread Cy Schubert
In message <201811161804.wagi44wc047...@pdx.rh.cn85.dnsmgr.net>, 
"Rodney W. Gri
mes" writes:
> > On Fri, Nov 16, 2018 at 7:29 AM Mateusz Piotrowski <0...@freebsd.org> wrote:
> > 
> > >   A few years ago jilles@ proposed changing reboot's default to signallin
> g
> > >   init (preserving reboot -q which just invokes the reboot system call),
> > > but
> > >   this was not accepted. Perhaps this can be tried again for 13.0.
> > >
> > 
> > I didn't like it at the time, however I was wrong. Much of my reasoning for
> > doing it has become muted as well since then, and the need to do it has
> > become more amplified as more rc scripts have grown shutdown
> > functionality...
> > 
> > I think if we make what's now reboot 'fastreboot' or 'reboot -q' (both of
> > which are historic replacements), we can make 'reboot' what's now 'shutdown
> > -r now'.
>
> I support this position.

reboot(2) should be changed to signal init(8). RB_AUTOBOOT should 
signal init while a new RB_FASTBOOT or RB_LEGACY (or pick a name) would 
preserve traditional behavior. RB_POWEROFF, RB_POWERCYCLE and RB_HALT 
would also signal init except when RB_FASTBOOT flag is set.

This aligns us better with what Linux is currently doing. IIRC Solaris 
still uses the legacy behavior however Solaris isn't relevant any more. 
Linux is pretty much the standard and we should endeavour to conform as 
much as we can.


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX: Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.
 

___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r340478 - head/share/man/man7

2018-11-16 Thread Rodney W. Grimes
> On Fri, Nov 16, 2018 at 7:29 AM Mateusz Piotrowski <0...@freebsd.org> wrote:
> 
> >   A few years ago jilles@ proposed changing reboot's default to signalling
> >   init (preserving reboot -q which just invokes the reboot system call),
> > but
> >   this was not accepted. Perhaps this can be tried again for 13.0.
> >
> 
> I didn't like it at the time, however I was wrong. Much of my reasoning for
> doing it has become muted as well since then, and the need to do it has
> become more amplified as more rc scripts have grown shutdown
> functionality...
> 
> I think if we make what's now reboot 'fastreboot' or 'reboot -q' (both of
> which are historic replacements), we can make 'reboot' what's now 'shutdown
> -r now'.

I support this position.
-- 
Rod Grimes rgri...@freebsd.org
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r340478 - head/share/man/man7

2018-11-16 Thread Warner Losh
On Fri, Nov 16, 2018 at 7:29 AM Mateusz Piotrowski <0...@freebsd.org> wrote:

>   A few years ago jilles@ proposed changing reboot's default to signalling
>   init (preserving reboot -q which just invokes the reboot system call),
> but
>   this was not accepted. Perhaps this can be tried again for 13.0.
>

I didn't like it at the time, however I was wrong. Much of my reasoning for
doing it has become muted as well since then, and the need to do it has
become more amplified as more rc scripts have grown shutdown
functionality...

I think if we make what's now reboot 'fastreboot' or 'reboot -q' (both of
which are historic replacements), we can make 'reboot' what's now 'shutdown
-r now'.

Warner
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"