Re: [dev] [st] [PATCH 1/2] Do not use switch for fork() call.

2015-04-13 Thread Roberto E. Vargas Caballero
After asking in the IRC channel, all the people thought like me. Both are correct, and the fork-switch is a very common idiom, which makes easier to see what is the objective of the code, so I will not apply this patch. Regards,

Re: [dev] [st] [PATCH 1/2] Do not use switch for fork() call.

2015-04-13 Thread noname
On Mon, Apr 13, 2015 at 09:20:34AM +0200, Roberto E. Vargas Caballero wrote: > I don't understand this patch. The switch-fork is a common idiom > and I don't know why you think it should be changed. It separates the case when fork fails and when fork succeeds. You can even move error-processing c

Re: [dev] [st] [PATCH 1/2] Do not use switch for fork() call.

2015-04-13 Thread Roberto E. Vargas Caballero
I don't understand this patch. The switch-fork is a common idiom and I don't know why you think it should be changed. Regards,

[dev] [st] [PATCH 1/2] Do not use switch for fork() call.

2015-04-11 Thread noname
--- st.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/st.c b/st.c index c48132a..df79e93 100644 --- a/st.c +++ b/st.c @@ -1257,11 +1257,10 @@ ttynew(void) { if(openpty(&m, &s, NULL, NULL, &w) < 0) die("openpty failed: %s\n", strerror(errno