Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 May 2012 23:21:10 +0400
From:      Alexander Pronin <scher@FreeBSD.org>
To:        freebsd-ports@freebsd.org, freebsd-stable@freebsd.org
Cc:        Marcus von Appen <mva@FreeBSD.org>
Subject:   [ GSOC ] Differences in shell behaviour
Message-ID:  <4E946838-4F3B-421A-839E-05E1A01464AB@FreeBSD.org>

next in thread | raw e-mail | index | archive | help

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?




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E946838-4F3B-421A-839E-05E1A01464AB>