source code for fg, bg command
can any one tell me where can i found the source code for fg and bg command. I have tried and searched every where but i am unable to find it. even on running which <fg command> and also for bg comand. I am not able to find even the patch file.
|
Hello,
I provided you with an answer to the same question on a thread where you posted it too. http://www.linuxquestions.org/questi...54#post3783754 Have you had a look at those links I provided? Kind regards, Eric |
I could not find anything there, please help me with the question.
|
The linuxfromscratch link provided by EricTRA was indeed a good starting point. I suggest an alternative and a method you can follow for other similar searches in the future. First use the type command to see which is the actual command executed (take in mind that some commands like echo, can be either a shell built-in or a standalone program. The type command will tell you which of them is currently used by your system).
Code:
$ type fg Take in mind that bash - as any other GNU software - is available for download at the GNU website, www.gnu.org. If your intent is to apply a patch, first it is strongly advised that you apply only the official ones. And it is even more strongly suggested that you wait for the updated package released by your linux distribution. Said that, since you're running on a RPM based system, if you really want to apply a patch you can download the source RPM and rebuild it. Back to the search of source code in general, suppose the type command returns the path to an executable (here we are talking about an external program - external as opposite of shell built-in). In this case you can try the rpm command to find out which package provided the executable, then you can look for and download the source code on the official (developer or project) site. Here is an example, taken from my CentOS box: Code:
$ type thunderbird Take in mind that in many cases you will be able to find the source code as source RPMs. This is especially true for software/packages built and provided by the official linux distribution you're running on. Just adding the Source RPM repository to the list of available software sources, should let you have easy and quick access to the code. Hope this helps! |
Quote:
There's no need to open a new one. On the contrary, that is usually annoying to some users. Duplication of threads is also against the common netiquette. As the other person said in your other thread, fg and bg are part of the shell (more correctly, they are shell builtins), so it's the source code for your shell what you should be looking for. In most distros nowadays, the default is bash. |
All times are GMT -5. The time now is 04:39 PM. |