WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: jwm creating redundant shell instances  (Read 1743 times)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
jwm creating redundant shell instances
« on: September 06, 2010, 07:33:37 AM »
For each aterm opened from jwm tray, a redundant '/bin/sh -c' process is created.
Same for each time watcher is swallowed on each jwm (re)start.
(using jwm-snapshot, TC 2.10).

To prevent this I did following:

Creation of shell scripts bterm and bwatcher in PATH
Code: [Select]
tc@box:~$ cat .local/bin/bterm
#!/bin/sh

exec aterm &
tc@box:~$ cat .local/bin/bwatcher
#!/bin/sh

exec watcher &

then in '/home/tc/.jwmrc-tray' i replaced the terms aterm -> bterm & watcher -> bwatcher

Note: If using any options with watcher, those have to be included in the script.

I could guess there might probably be more elegant solutions, but this did the job for me.  ;D
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: jwm creating redundant shell instances
« Reply #1 on: September 07, 2010, 10:08:22 AM »
It probably uses sh -c to launch them.  I think using
Code: [Select]
#!/bin/sh
exec app
would be "more correct" though

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: jwm creating redundant shell instances
« Reply #2 on: September 07, 2010, 10:57:39 AM »
It probably uses sh -c to launch them.  I think using
Code: [Select]
#!/bin/sh
exec app
would be "more correct" though
Umm, do you mean just to omit the "&" in the scripts i created instead??
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)