UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
it's a binary, and the redirections are meant for ltplayerlua... I'm kinda seeing where you are going with this, but the redirections seem to be working fine, i.e. no output on the terminal.
I'm not sure how the redirection works in your environment. But, AFAIK, in some
environments, the shell would be doing the redirection for the taskset command
initially, not the ltplayerlua, because you haven't escaped the redirections.
As far as the shell syntax is concerned, taskset is the command. It doesn't know
that ltplayerlua is a command. To the shell, ltplayerlua is just an argument to
the taskset command.
Then, if your environment was set up not to close file descriptors during execution
of a subtask, ltplayerlua could inherit that redirection once it executes. With
some programs, if they are not connected to a tty, they conclude that they are
running in the background, and behave differently. In your environment, if the
redirections do first apply to taskset, since it's then no longer associated with
a tty, maybe it behaves differently.
In my environment, I know of no documentation that says that taskset will behave
differently if it's running in the background. So I know of no specific reason why
it would. But you're doing two things that are similar, you're expecting similar
results, and you're not getting similar results. I often find that looking at the
differences between two similar things, one that works and one that doesn't, allows
me to get the one that wasn't working, to work, without having to explain exactly
why it didn't work in the first place.
You might want to try to find a way to force the redirections to apply only to
ltplayerlua. Or for now, just hard code the use of /dev/null internal to
ltplayerlua just to see if it works that way.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.