All of lore.kernel.org
 help / color / mirror / Atom feed
* waitpid errors with shell aliases
@ 2022-10-21  9:26 shubham sharma
  2022-10-24  0:28 ` brian m. carlson
  0 siblings, 1 reply; 3+ messages in thread
From: shubham sharma @ 2022-10-21  9:26 UTC (permalink / raw)
  To: git

Hi,

I am using git shell aliases in config and was facing some weird
error. The error is not reproducible in all runs and occurs randomly
between runs...consider the minimal config(alias section) below for
usage idea:

[alias]
    A = "!f(){ \
        ( \
              // implementation
              git \"$1\"; \
        ) 250<dir/tmp; \
    }; f"
    B = "!f(){ \
        ssh <server> <command>; \
    }; f"
    C= "!f(){ \
        git A B; \
    }; f"

when firing "git C" from shell,in some cases(not deterministically reproducible)
i observed weird waitpid errors of the type :

error: waitpid for f(){         ssh <server> <command>;    }; f
failed: No child processes
fatal: while expanding alias 'B': 'f(){       ssh <server> <command>;
     }; f': No child processes
error: waitpid for f(){     (//implementation; git "$1"; )250<dir/tmp;
   }; f failed: No child processes
fatal: while expanding alias 'A': 'f(){        (//implementation; git
"$1"; )250<dir/tmp;      }; f': No child processes
error: waitpid for f(){    git A B;    }; f failed: No child processes
fatal: while expanding alias 'C': 'f(){       git A B;      }; f': No
child processes

can anyone please help as to what could possibly be the reason for this?

Thanks,
Shubham

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: waitpid errors with shell aliases
  2022-10-21  9:26 waitpid errors with shell aliases shubham sharma
@ 2022-10-24  0:28 ` brian m. carlson
  2022-10-25  9:47   ` shubham sharma
  0 siblings, 1 reply; 3+ messages in thread
From: brian m. carlson @ 2022-10-24  0:28 UTC (permalink / raw)
  To: shubham sharma; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 1691 bytes --]

On 2022-10-21 at 09:26:11, shubham sharma wrote:
> Hi,
> 
> I am using git shell aliases in config and was facing some weird
> error. The error is not reproducible in all runs and occurs randomly
> between runs...consider the minimal config(alias section) below for
> usage idea:
> 
> [alias]
>     A = "!f(){ \
>         ( \
>               // implementation
>               git \"$1\"; \
>         ) 250<dir/tmp; \
>     }; f"
>     B = "!f(){ \
>         ssh <server> <command>; \
>     }; f"
>     C= "!f(){ \
>         git A B; \
>     }; f"
> 
> when firing "git C" from shell,in some cases(not deterministically reproducible)
> i observed weird waitpid errors of the type :
> 
> error: waitpid for f(){         ssh <server> <command>;    }; f
> failed: No child processes
> fatal: while expanding alias 'B': 'f(){       ssh <server> <command>;
>      }; f': No child processes
> error: waitpid for f(){     (//implementation; git "$1"; )250<dir/tmp;
>    }; f failed: No child processes
> fatal: while expanding alias 'A': 'f(){        (//implementation; git
> "$1"; )250<dir/tmp;      }; f': No child processes
> error: waitpid for f(){    git A B;    }; f failed: No child processes
> fatal: while expanding alias 'C': 'f(){       git A B;      }; f': No
> child processes
> 
> can anyone please help as to what could possibly be the reason for this?

Could you tell us what OS and version of Git you're running, and what
shell /bin/sh is?  I could imagine that there might be some weirdness on
Windows with the shell, but I would find an ECHILD to be surprising on
Unix.
-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: waitpid errors with shell aliases
  2022-10-24  0:28 ` brian m. carlson
@ 2022-10-25  9:47   ` shubham sharma
  0 siblings, 0 replies; 3+ messages in thread
From: shubham sharma @ 2022-10-25  9:47 UTC (permalink / raw)
  To: brian m. carlson, shubham sharma, git

Hi,

/bin/sh -> GNU bash, version 5.1.4(1)-release (x86_64-pc-linux-gnu)
OS -> Arch Linux
Kernel: Linux 5.4.86-1-lts
Architecture: x86-64
git -> git version 2.30.0

Thanks,
Shubham

On Mon, Oct 24, 2022 at 5:58 AM brian m. carlson
<sandals@crustytoothpaste.net> wrote:
>
> On 2022-10-21 at 09:26:11, shubham sharma wrote:
> > Hi,
> >
> > I am using git shell aliases in config and was facing some weird
> > error. The error is not reproducible in all runs and occurs randomly
> > between runs...consider the minimal config(alias section) below for
> > usage idea:
> >
> > [alias]
> >     A = "!f(){ \
> >         ( \
> >               // implementation
> >               git \"$1\"; \
> >         ) 250<dir/tmp; \
> >     }; f"
> >     B = "!f(){ \
> >         ssh <server> <command>; \
> >     }; f"
> >     C= "!f(){ \
> >         git A B; \
> >     }; f"
> >
> > when firing "git C" from shell,in some cases(not deterministically reproducible)
> > i observed weird waitpid errors of the type :
> >
> > error: waitpid for f(){         ssh <server> <command>;    }; f
> > failed: No child processes
> > fatal: while expanding alias 'B': 'f(){       ssh <server> <command>;
> >      }; f': No child processes
> > error: waitpid for f(){     (//implementation; git "$1"; )250<dir/tmp;
> >    }; f failed: No child processes
> > fatal: while expanding alias 'A': 'f(){        (//implementation; git
> > "$1"; )250<dir/tmp;      }; f': No child processes
> > error: waitpid for f(){    git A B;    }; f failed: No child processes
> > fatal: while expanding alias 'C': 'f(){       git A B;      }; f': No
> > child processes
> >
> > can anyone please help as to what could possibly be the reason for this?
>
> Could you tell us what OS and version of Git you're running, and what
> shell /bin/sh is?  I could imagine that there might be some weirdness on
> Windows with the shell, but I would find an ECHILD to be surprising on
> Unix.
> --
> brian m. carlson (he/him or they/them)
> Toronto, Ontario, CA

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-25  9:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-21  9:26 waitpid errors with shell aliases shubham sharma
2022-10-24  0:28 ` brian m. carlson
2022-10-25  9:47   ` shubham sharma

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.