Re: Any guide about writing my own bash built-in commands?

2010-02-01 Thread Greg Wooledge
On Sat, Jan 30, 2010 at 03:17:22PM +0100, Joachim Schmitz wrote: > Clark J. Wang wrote: > >Hi all, > > > >I want to write my own built-in bash commands but I cannot find any > >info about that in bash manual. Anyone has any idea? > > Have a look into the .def files in the builtins directory of bas

Re: [PATCH] builtins/test.def: Update string equality operator.

2010-02-01 Thread Chet Ramey
On 1/31/10 5:26 PM, Mark Polesky wrote: > Configuration Information [Automatically generated, do not change]: > Machine: x86_64 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' > -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' > -DCO

Re: Any guide about writing my own bash built-in commands?

2010-02-01 Thread Joachim Schmitz
Greg Wooledge wrote: On Sat, Jan 30, 2010 at 03:17:22PM +0100, Joachim Schmitz wrote: Clark J. Wang wrote: Hi all, I want to write my own built-in bash commands but I cannot find any info about that in bash manual. Anyone has any idea? Have a look into the .def files in the builtins director

Re: Any guide about writing my own bash built-in commands?

2010-02-01 Thread Joachim Schmitz
Greg Wooledge wrote: On Sat, Jan 30, 2010 at 03:17:22PM +0100, Joachim Schmitz wrote: Clark J. Wang wrote: Hi all, I want to write my own built-in bash commands but I cannot find any info about that in bash manual. Anyone has any idea? Have a look into the .def files in the builtins director

Re: Any guide about writing my own bash built-in commands?

2010-02-01 Thread Clark J. Wang
Thanks, all. I've made up my first loadable bash builtin and it's running fine. Another problem: There's a select() system call in my builtin which looks like this: rc = select(0, &fds, NULL, NULL, &tmout); if (rc < 0 && EINTR == errno) { return 9; } When select() was waiting there, I press