From ffa7482cb6de4e2ec2e8f99a832fc9a6425150b6 Mon Sep 17 00:00:00 2001 From: Ton Voon Date: Tue, 6 Apr 2004 16:02:13 +0000 Subject: Fixed weird scanf bug on Solaris git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@864 f882894a-f735-0410-b71e-b25c423dba1c --- configure.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index f6c33dc6..3173d6d4 100644 --- a/configure.in +++ b/configure.in @@ -737,12 +737,15 @@ then ac_cv_ps_cols=7 AC_MSG_RESULT([$ac_cv_ps_command - with no RSS]) +dnl Solaris 2.6 elif ps -Ao 's comm vsz rss uid user ppid args' 2>/dev/null | \ egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null then ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" ac_cv_ps_command="$PATH_TO_PS -Ao 's uid ppid vsz rss pcpu comm args'" - ac_cv_ps_format="%s %d %d %d %d %f %s %n" + # There must be no space between the %s and %n due to a wierd problem in sscanf where + # it will return %n as longer than the line length + ac_cv_ps_format="%s %d %d %d %d %f %s%n" ac_cv_ps_cols=8 AC_MSG_RESULT([$ac_cv_ps_command]) -- cgit v1.2.3-74-g34f1