[–] cheeselip420 3y ago ↗ why; not; just; run; commands; sequentially; in; bash? [–] dyx 3y ago ↗ 1. I want to run commands in background, but sequentially 2. Used in a server application for queued long-time task [–] cheeselip420 3y ago ↗ (so; why; not; run; in; background;)& ? [–] dyx 3y ago ↗ You are right in this situation.The scene for this program is that I don't know all the tasks.Namely, tasks are generated in real time.1. I posted some task to the queue and continue my work, then the work make me post another work. e. g. in a shell script2. For server application to queue tasks [–] cheeselip420 3y ago ↗ Thanks for the explanation (and patience lol)
[–] dyx 3y ago ↗ 1. I want to run commands in background, but sequentially 2. Used in a server application for queued long-time task [–] cheeselip420 3y ago ↗ (so; why; not; run; in; background;)& ? [–] dyx 3y ago ↗ You are right in this situation.The scene for this program is that I don't know all the tasks.Namely, tasks are generated in real time.1. I posted some task to the queue and continue my work, then the work make me post another work. e. g. in a shell script2. For server application to queue tasks [–] cheeselip420 3y ago ↗ Thanks for the explanation (and patience lol)
[–] cheeselip420 3y ago ↗ (so; why; not; run; in; background;)& ? [–] dyx 3y ago ↗ You are right in this situation.The scene for this program is that I don't know all the tasks.Namely, tasks are generated in real time.1. I posted some task to the queue and continue my work, then the work make me post another work. e. g. in a shell script2. For server application to queue tasks [–] cheeselip420 3y ago ↗ Thanks for the explanation (and patience lol)
[–] dyx 3y ago ↗ You are right in this situation.The scene for this program is that I don't know all the tasks.Namely, tasks are generated in real time.1. I posted some task to the queue and continue my work, then the work make me post another work. e. g. in a shell script2. For server application to queue tasks [–] cheeselip420 3y ago ↗ Thanks for the explanation (and patience lol)
[–] icedchai 3y ago ↗ This seems similar to the FreeBSD lockf command: https://www.freebsd.org/cgi/man.cgi?query=lockf [–] dyx 3y ago ↗ I implement this program since flock(1) in Linux doesn't support timeout of pending.I've never used BSD. After reading the link provided by you, I think my program becomes no value, if there is a Linux version of lockf(1). Sad. [–] dyx 3y ago ↗ Oh, after carefully check the man page of flock(1) in Linux, it supports timeout. So the last value of this program disappears. Please ignore my ignorance and disturbance. I wish I could delete the post but there is no way to do it. [–] icedchai 3y ago ↗ You still got to learn about POSIX!
[–] dyx 3y ago ↗ I implement this program since flock(1) in Linux doesn't support timeout of pending.I've never used BSD. After reading the link provided by you, I think my program becomes no value, if there is a Linux version of lockf(1). Sad. [–] dyx 3y ago ↗ Oh, after carefully check the man page of flock(1) in Linux, it supports timeout. So the last value of this program disappears. Please ignore my ignorance and disturbance. I wish I could delete the post but there is no way to do it. [–] icedchai 3y ago ↗ You still got to learn about POSIX!
[–] dyx 3y ago ↗ Oh, after carefully check the man page of flock(1) in Linux, it supports timeout. So the last value of this program disappears. Please ignore my ignorance and disturbance. I wish I could delete the post but there is no way to do it. [–] icedchai 3y ago ↗ You still got to learn about POSIX!
9 comments
[ 2.1 ms ] story [ 26.9 ms ] threadThe scene for this program is that I don't know all the tasks.
Namely, tasks are generated in real time.
1. I posted some task to the queue and continue my work, then the work make me post another work. e. g. in a shell script
2. For server application to queue tasks
I've never used BSD. After reading the link provided by you, I think my program becomes no value, if there is a Linux version of lockf(1). Sad.