[ GSOC ] Differences in shell behaviour

Alexander Pronin scher at FreeBSD.org
Thu May 31 19:21:16 UTC 2012


Hello everyone!
I am GSOC student at FreeBSD Project.
So my GSOC Project is "Parallelization in the ports collection".
You may checkout wiki page of this project: http://wiki.freebsd.org/SummerOfCode2012/Parallelization_in_the_ports_collection

Is it suitable to write sh script for 9.0, that does not work in 8.3?

To sum up, the scenario is as following:
I need to spawn some processes in background to build port's dependencies.
Store their pids.
Wait for a while or do some stuff.
explore exit codes of spawned processes by their pids.

The problem is:
### sh in 8.3
$ false & pid=$!
$ 
[1]   Done (1)                false
$ wait ${pid}
wait: No such job: 4852

-----------------------
### sh in releng9
$ false & pid=$!
$ 
[1]   Done(1)                 false
$ wait ${pid}
$ echo $?
1
$

I am currently working in releng9 environment, so the result suits my needs.

But, is it suitable to write sh script for 9.0, that does not work in 8.3?



More information about the freebsd-stable mailing list