List Info

Thread: res_monitor.so bug? in ast_monitor_stop




res_monitor.so bug? in ast_monitor_stop
user name
2006-05-25 07:25:00
Greetings,

Just noticed that the monitored audio files are not being
joined under 
FreeBSD. Upon closer inspection, I found the culprit in the 
ast_monitor_stop:

                         if (ast_strlen_zero(execute)) {
                                 execute = "nice -n 19
soxmix";
                                 delfiles = 1;
                         }

Now, while the docs say that the '-n' is the way to go,
here is the 
output from it:

# nice -n 19 soxmix
nice: Badly formed number.

However, this works:

# nice -19 soxmix
soxmix: Usage: [ gopts ] [ fopts ] ifile1 [fopts] ifile2 [
fopts ] ofile 
[ effect [ effopts ] ]

Failed: Not enough input or output filenames specified

So what's is going on? While this looks like a bug with
nice, a patch 
could be handy for net/asterisk IMHO.

regards,
Vahan

_______________________________________________
Asterisk-BSD mailing list
Asterisk-BSDlists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-bsd
res_monitor.so bug? in ast_monitor_stop
user name
2006-05-25 07:52:36
On 05/25/06 15:25 Vahan Yerkanian said the following:
> Greetings,
> 
> Just noticed that the monitored audio files are not
being joined under 
> FreeBSD. Upon closer inspection, I found the culprit in
the 
> ast_monitor_stop:
> 
>                         if (ast_strlen_zero(execute)) {
>                                 execute = "nice
-n 19 soxmix";
>                                 delfiles = 1;
>                         }
> 
> Now, while the docs say that the '-n' is the way to
go, here is the 
> output from it:
> 
> # nice -n 19 soxmix
> nice: Badly formed number.

which version of freebsd are you using ? on 6.x, it nice(1)
says,

NICE(1)                 FreeBSD General Commands Manual     
          NICE(1)

NAME
      nice -- execute a utility at an altered scheduling
priority

SYNOPSIS
      nice [-n increment] utility [argument ...]

DESCRIPTION
      The nice utility runs utility at an altered scheduling
priority, by
      incrementing its ``nice'' value by the specified
increment, or a
      default value of 10.  The lower the nice value of a
process, the
      higher its scheduling priority.

      The superuser may specify a negative increment in
order to run a
      utility with a higher scheduling priority.

      Some shells may provide a builtin nice command which
is similar or
      identical to this utility.  Consult the builtin(1)
manual page.
[..snipped..]

and this is consistent with the usage of nice within
ast_monitor_stop().

-- 
Regards,                           /\_/\   "All dogs
go to heaven."
dineshalphaque.com                (0 0)   http://www.openmalay
siablog.com/
+==========================----oOO--(_)--OOo----============
==============+
| for a in past present future; do                          
             |
|   for b in clients employers associates relatives
neighbours pets; do   |
|   echo "The opinions here in no way reflect the
opinions of my $a $b."  |
| done; done                                                
             |
+===========================================================
==============+
_______________________________________________
Asterisk-BSD mailing list
Asterisk-BSDlists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-bsd
res_monitor.so bug? in ast_monitor_stop
user name
2006-05-25 08:12:55
Dinesh Nair wrote:
 >
 > which version of freebsd are you using ? on 6.x, it
nice(1) says,
[snip]

Checked this right now on FreeBSD 5.4, FreeBSD 6.0 and 6.1:

$ nice -n 19 soxmix
soxmix: Usage: [ gopts ] [ fopts ] ifile1 [fopts] ifile2 [
fopts ] ofile 
[ effect [ effopts ] ]

Failed: Not enough input or output filenames specified
$ su
Password:
# nice -n 19 soxmix
nice: Badly formed number.
# which nice
nice: shell built-in command.
$ which nice
/usr/bin/nice

A-ha! Well, maybe then add path to nice, as those are
clean-installed 
freebsd boxes with no modification to the path environment
etc, they 
still execute csh's built-in nice command.

Or I'm missing something important?

Vahan

_______________________________________________
Asterisk-BSD mailing list
Asterisk-BSDlists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-bsd
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )