Jump to content

Bash threads on CT


TBone

Recommended Posts

Hi Forum,

Please let me take a "low level" question about what I experienced on my CT. It should be my misunderstanding but it would be good if someone could help to clarify.

 

On my CT udev mounts a USB device then starts a bash script in the background. This script lunches some bash threads and waits for them to complete. The threads has no common job on any file or resource. In the third level of nesting cp -r chrashes without any error message. It leaves the logging sentence in the middle, so it's really chrashes. rsync does the same but for different files.

 

The scripts are fully functional if I start them from a root console. Even if started in the background.

 

Is there any constraint that should be taken into account in these cases on CT or on Armbian or regarding udev rules?

Any tools for such bg processes? Other than logfiles.

 

Any idea welcomed.

 

Thank you in advance,

T

Link to comment
Share on other sites

Armbian & Khadas are rewarding contributors

From udev man page:

PROGRAM
Execute a program to determine whether there is a match; the key is true if the program returns successfully. The device properties are made available to the executed program in the environment. The program's standard output is available in the RESULT key.

This can only be used for very short-running foreground tasks. For details, see RUN.
RUN{type}
Add a program to the list of programs to be executed after processing all the rules for a specific event, depending on "type":

"program"
Execute an external program specified as the assigned value. If no absolute path is given, the program is expected to live in /usr/lib/udev; otherwise, the absolute path must be specified.

This is the default if no type is specified.

"builtin"
As program, but use one of the built-in programs rather than an external one.

The program name and following arguments are separated by spaces. Single quotes can be used to specify arguments with spaces.

This can only be used for very short-running foreground tasks. Running an event process for a long period of time may block all further events for this or a dependent device.

Starting daemons or other long-running processes is not appropriate for udev; the forked processes, detached or not, will be unconditionally killed after the event handling has finished.
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines