Re: [dev] st -e
S. R. Gal said: 1. what would be st syntax for xterm -e 'tmux a -d || tmux'? st -e sh -c 'tmux a -d || tmux' 2. what font st uses when there is no glyph in the default one? Whatever system provides? -- Dmitrij D. Czarkoff
[dev] st -e
1. what would be st syntax for xterm -e 'tmux a -d || tmux'? 2. what font st uses when there is no glyph in the default one? Sincerely, S. R. Gal
Re: [dev] [PATCH 1/1] remove useless dup()
On Wed, Jul 08, 2015 at 09:30:47PM +0200, Markus Wichmann wrote: On Wed, Jul 08, 2015 at 12:00:35PM +0200, Roberto E. Vargas Caballero wrote: We are ignoring return value of dup(), so just remove it. From dup(3): The dup() system call creates a copy of the file descriptor oldfd, using the lowest-numbered unused descriptor for the new descriptor. Yes, but can't dup() fail? Shouldn't we at least check or that? No, it cannot. From dup(2): ERRORS EBADF oldfd isn't an open file descriptor, or newfd is out of the allowed range for file descriptors. EBUSY (Linux only) This may be returned by dup2() or dup3() during a race condition with open(2) and dup(). EINTR The dup2() or dup3() call was interrupted by a signal; see signal(7). EINVAL (dup3()) flags contain an invalid value. Or, oldfd was equal to newfd. EMFILE The process already has the maximum number of file descriptors open and tried to open a new one. Any of them apply here. I'm beginning to think that maybe it is a good idea to change the call to dup to dup2, not due to the lateral effect or to the error handling, due to we have calls to dup2 in the same function and we will also remove a line of code, so I will accept such patch. Regards,
Re: [dev] st -e
On Thu, Jul 09, 2015 at 10:23:45PM +0200, S. R. Gal wrote: st -e sh -c 'tmux a -d || tmux' Both, above and st -e ''tmux a -d || tmux'', seem to work but they result with the following error messages: Theoretically you can also omit -e in both cases. Regards,
Re: [dev] st -e
S. R. Gal said: Is there an advantage of sh -c as oposed to double quotes? Looks like opposite is true - with double quotes you'll get one process less. -- Dmitrij D. Czarkoff
Re: [dev] st -e
-- From Dmitrij D. Czarkoff 09-07-2015 at 17:40 -- S. R. Gal said: 1. what would be st syntax for xterm -e 'tmux a -d || tmux'? st -e sh -c 'tmux a -d || tmux' Both, above and st -e ''tmux a -d || tmux'', seem to work but they result with the following error messages: erresc: unknown private set/reset mode 1005 erresc: unknown str ESC]112ESC\ erresc: unknown str ESC]112ESC\ erresc: unknown private set/reset mode 1005 Should I not pay attention to those messages? Is there an advantage of sh -c as oposed to double quotes? 2. what font st uses when there is no glyph in the default one? Whatever system provides? Pardon my lame question, how can I check that? S. R. Gal
Re: [dev] st -e
On Thu, Jul 09, 2015 at 10:23:45PM +0200, S. R. Gal wrote: erresc: unknown private set/reset mode 1005 erresc: unknown str ESC]112ESC\ erresc: unknown str ESC]112ESC\ erresc: unknown private set/reset mode 1005 Should I not pay attention to those messages? Those messages are caused by tmux trying to use TTY / PTY features that st does not support. They can safely be ignored. Eric