News for hackers. Stuff that matters.
Re:Got called to a professor’s office after a complaint his ... by suid on Tuesday July 25, 2023 @02:03AM (#36858533)
If PID 1 exits, the system usually panics immediately and restarts.
Re:Got called to a professor’s office after a complaint his ... by rzzzt on Tuesday July 25, 2023 @02:24AM (#36858662)
Re:Got called to a professor’s office after a complaint his ... by rollcat on Tuesday July 25, 2023 @05:30AM (#36859935)
"...and that's why we have to put half a million lines of C in PID 1"
Re:Got called to a professor’s office after a complaint his ... by NikkiA on Tuesday July 25, 2023 @02:00PM (#36866625)
i'm reasonably sure that kill -1 1 used to be a canonical way to `halt`
Re:Got called to a professor’s office after a complaint his ... by mcguire on Tuesday July 25, 2023 @03:41PM (#36868210)
I used to work with a long-time AIX kernel developer. His method of shutting off his machine was "sync; sync; kill -9 1".

Of course, his method of preparing to move offices (a common occurrence at IBM) was to

1. Take his (RS-6000) workstation home with him the night of the move.

2. Otherwise, just lock his desk.

He didn't have anything in his office but his chair, desk, and workstation.

Re:Got called to a professor’s office after a complaint his ... by BrandoElFollito on Wednesday July 26, 2023 @11:50AM (#36879752)
As a random trivia about sysadmins: the reason he sync-ed twice is not because "twice is better than once, just to make sure".

Sync is not synchronous. When it is back to the shell there is no guarantee that data in memory is fully copied to disk.

However, it sets a flag that is reset when the copying is done. Sync will hang if the flag is set.

So the first sync arms the copy and sets the flag and is back to the shell.

The second sync starts, blocks at the flag. The flag gets reset and it is back to the shell.

So the 2nd sync going back to the shell is a guarantee that the first sync is fine and data is safe