Reputation: 3434
I've researched so far that Wildcards in Linux were a binary located in /etc/glob, or in C functions called glob(). Nowadays it's native in any Unix-based system, but, it's confusing to understand where it runs, when we type something like:
mv * folder
ls *
Is it running in user space or kernel space?
This is the context
Upvotes: 0
Views: 743
Reputation: 35
There isn't such syscall glob. The wildcard feature in bash is provided by the glob() function, which runs in the user space. Credits for @Vercingatorix
To see a list of syscalls, run man syscalls
.
This new reply is for calling out that the accepted answer is wrong and can mislead readers.
Upvotes: 0
Reputation: 129
Is Kernel space used when Kernel is executing on the behalf of the user program i.e. System Call? Or is it the address space for all the Kernel threads (for example scheduler)?
Yes and yes.
They will I presume use glob(3), a system call, to accomplish this. System calls take place in kernel space. Also glob(3) will make other system calls such as opendir(), also running in kernel space.
Upvotes: 3
Reputation: 1884
This is done at the shell level in the example you give, e.g. bash, tcsh, etc. They will I presume use glob(3), a C library function, to accomplish this. This is strictly user-space.
Upvotes: 3