@ayke It is a bug, not because you need that specific length duration, but because it fails an operation that's clearly meant as "permanent sleep until killed". Which is how it should be implemented.
Conversation
Notices
-
Embed this notice
Rich Felker (dalias@hachyderm.io)'s status on Thursday, 14-Aug-2025 19:36:35 JST
Rich Felker
-
Embed this notice
Rich Felker (dalias@hachyderm.io)'s status on Thursday, 14-Aug-2025 20:19:02 JST
Rich Felker
@jornane The default behavior of strtoll saturates on overflow. All you have to do is use the saturated value rather than treating it as an error.
-
Embed this notice
Jørn (jornane@mastodon.bsd.cafe)'s status on Thursday, 14-Aug-2025 20:19:04 JST
Jørn
@dalias @ayke Which you can do with sleep one billion years. Or tee.
Honestly, I'm happy they didn't go for "funny" number parsing; most number parse errors should return an error.
-
Embed this notice
Rich Felker (dalias@hachyderm.io)'s status on Thursday, 14-Aug-2025 20:24:40 JST
Rich Felker
@jornane It won't wake before the wait time because the hardware and operating civilization will be dead before 0.001% of the wait time.
-
Embed this notice
Jørn (jornane@mastodon.bsd.cafe)'s status on Thursday, 14-Aug-2025 20:24:42 JST
Jørn
@dalias Ah that makes sense. I see no reason to check errno there if the only error that can occur is ERANGE.
-
Embed this notice
Tony Finch (fanf@mendeddrum.org)'s status on Friday, 15-Aug-2025 02:14:59 JST
Tony Finch
@leah @dalias @ayke reminds me of one of the first y2038 bugs that occurred when a sleep 1000000000 stopped sleeping
-
Embed this notice
Leah Neukirchen (leah@blahaj.social)'s status on Friday, 15-Aug-2025 02:15:01 JST
Leah Neukirchen
Rich Felker repeated this.
-
Embed this notice