{"thread":{"id":"58665","subject":"waitpid errors with shell aliases","startedAt":"2022-10-21T09:27:02Z","lastAt":"2022-10-25T09:48:16Z","messageCount":3,"participants":["shubham sharma","brian m. carlson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"465441","messageId":"CADUYy5vwfOJOFBQ+zUmkrsxGO=E9N5vUbsVRgjBn_MMY2X6H=A@mail.gmail.com","threadId":"58665","inReplyTo":null,"subject":"waitpid errors with shell aliases","fromName":"shubham sharma","fromEmail":"shubhamsharma4060@gmail.com","sentAt":"2022-10-21T09:26:11Z","receivedAt":"2022-10-21T09:27:02Z","isPatch":false,"sender":{"key":"shubhamsharma4060@gmail.com","avatar":null},"body":"Hi,\n\nI am using git shell aliases in config and was facing some weird\nerror. The error is not reproducible in all runs and occurs randomly\nbetween runs...consider the minimal config(alias section) below for\nusage idea:\n\n[alias]\n    A = \"!f(){ \\\n        ( \\\n              // implementation\n              git \\\"$1\\\"; \\\n        ) 250<dir/tmp; \\\n    }; f\"\n    B = \"!f(){ \\\n        ssh <server> <command>; \\\n    }; f\"\n    C= \"!f(){ \\\n        git A B; \\\n    }; f\"\n\nwhen firing \"git C\" from shell,in some cases(not deterministically reproducible)\ni observed weird waitpid errors of the type :\n\nerror: waitpid for f(){         ssh <server> <command>;    }; f\nfailed: No child processes\nfatal: while expanding alias 'B': 'f(){       ssh <server> <command>;\n     }; f': No child processes\nerror: waitpid for f(){     (//implementation; git \"$1\"; )250<dir/tmp;\n   }; f failed: No child processes\nfatal: while expanding alias 'A': 'f(){        (//implementation; git\n\"$1\"; )250<dir/tmp;      }; f': No child processes\nerror: waitpid for f(){    git A B;    }; f failed: No child processes\nfatal: while expanding alias 'C': 'f(){       git A B;      }; f': No\nchild processes\n\ncan anyone please help as to what could possibly be the reason for this?\n\nThanks,\nShubham\n"},{"id":"465606","messageId":"Y1XcQctK/SkDZCbt@tapette.crustytoothpaste.net","threadId":"58665","inReplyTo":"CADUYy5vwfOJOFBQ+zUmkrsxGO=E9N5vUbsVRgjBn_MMY2X6H=A@mail.gmail.com","subject":"Re: waitpid errors with shell aliases","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2022-10-24T00:28:49Z","receivedAt":"2022-10-24T00:28:55Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2022-10-21 at 09:26:11, shubham sharma wrote:\n> Hi,\n> \n> I am using git shell aliases in config and was facing some weird\n> error. The error is not reproducible in all runs and occurs randomly\n> between runs...consider the minimal config(alias section) below for\n> usage idea:\n> \n> [alias]\n>     A = \"!f(){ \\\n>         ( \\\n>               // implementation\n>               git \\\"$1\\\"; \\\n>         ) 250<dir/tmp; \\\n>     }; f\"\n>     B = \"!f(){ \\\n>         ssh <server> <command>; \\\n>     }; f\"\n>     C= \"!f(){ \\\n>         git A B; \\\n>     }; f\"\n> \n> when firing \"git C\" from shell,in some cases(not deterministically reproducible)\n> i observed weird waitpid errors of the type :\n> \n> error: waitpid for f(){         ssh <server> <command>;    }; f\n> failed: No child processes\n> fatal: while expanding alias 'B': 'f(){       ssh <server> <command>;\n>      }; f': No child processes\n> error: waitpid for f(){     (//implementation; git \"$1\"; )250<dir/tmp;\n>    }; f failed: No child processes\n> fatal: while expanding alias 'A': 'f(){        (//implementation; git\n> \"$1\"; )250<dir/tmp;      }; f': No child processes\n> error: waitpid for f(){    git A B;    }; f failed: No child processes\n> fatal: while expanding alias 'C': 'f(){       git A B;      }; f': No\n> child processes\n> \n> can anyone please help as to what could possibly be the reason for this?\n\nCould you tell us what OS and version of Git you're running, and what\nshell /bin/sh is?  I could imagine that there might be some weirdness on\nWindows with the shell, but I would find an ECHILD to be surprising on\nUnix.\n-- \nbrian m. carlson (he/him or they/them)\nToronto, Ontario, CA\n"},{"id":"465690","messageId":"CADUYy5sv-rc-hRB9xV2uK05k+S2G7AADiA9w6iD8pzoYMPQqGw@mail.gmail.com","threadId":"58665","inReplyTo":"Y1XcQctK/SkDZCbt@tapette.crustytoothpaste.net","subject":"Re: waitpid errors with shell aliases","fromName":"shubham sharma","fromEmail":"shubhamsharma4060@gmail.com","sentAt":"2022-10-25T09:47:28Z","receivedAt":"2022-10-25T09:48:16Z","isPatch":false,"sender":{"key":"shubhamsharma4060@gmail.com","avatar":null},"body":"Hi,\n\n/bin/sh -> GNU bash, version 5.1.4(1)-release (x86_64-pc-linux-gnu)\nOS -> Arch Linux\nKernel: Linux 5.4.86-1-lts\nArchitecture: x86-64\ngit -> git version 2.30.0\n\nThanks,\nShubham\n\nOn Mon, Oct 24, 2022 at 5:58 AM brian m. carlson\n<sandals@crustytoothpaste.net> wrote:\n>\n> On 2022-10-21 at 09:26:11, shubham sharma wrote:\n> > Hi,\n> >\n> > I am using git shell aliases in config and was facing some weird\n> > error. The error is not reproducible in all runs and occurs randomly\n> > between runs...consider the minimal config(alias section) below for\n> > usage idea:\n> >\n> > [alias]\n> >     A = \"!f(){ \\\n> >         ( \\\n> >               // implementation\n> >               git \\\"$1\\\"; \\\n> >         ) 250<dir/tmp; \\\n> >     }; f\"\n> >     B = \"!f(){ \\\n> >         ssh <server> <command>; \\\n> >     }; f\"\n> >     C= \"!f(){ \\\n> >         git A B; \\\n> >     }; f\"\n> >\n> > when firing \"git C\" from shell,in some cases(not deterministically reproducible)\n> > i observed weird waitpid errors of the type :\n> >\n> > error: waitpid for f(){         ssh <server> <command>;    }; f\n> > failed: No child processes\n> > fatal: while expanding alias 'B': 'f(){       ssh <server> <command>;\n> >      }; f': No child processes\n> > error: waitpid for f(){     (//implementation; git \"$1\"; )250<dir/tmp;\n> >    }; f failed: No child processes\n> > fatal: while expanding alias 'A': 'f(){        (//implementation; git\n> > \"$1\"; )250<dir/tmp;      }; f': No child processes\n> > error: waitpid for f(){    git A B;    }; f failed: No child processes\n> > fatal: while expanding alias 'C': 'f(){       git A B;      }; f': No\n> > child processes\n> >\n> > can anyone please help as to what could possibly be the reason for this?\n>\n> Could you tell us what OS and version of Git you're running, and what\n> shell /bin/sh is?  I could imagine that there might be some weirdness on\n> Windows with the shell, but I would find an ECHILD to be surprising on\n> Unix.\n> --\n> brian m. carlson (he/him or they/them)\n> Toronto, Ontario, CA\n"}]}