#bun shell timeout

1 messages · Page 1 of 1 (latest)

neat mantle
#

hi!! i found using the bun shell in my project useful
but is there a way to add a timeout to the command execution without returning to child_process?

graceful igloo
#

if you just want to sleep can you not just use shell sleep() function ?

neat mantle
#

i don't need sleep. i have long-running commands whose exec time i want to control

#

i a bit googled. the only way i've found that allows to do this is shell internal command timeout
so it will looks like $timeout 2 <command>

if there are no built-in methods in bun, I will use this one