トップ «前の日(06-03) 最新 次の日(06-05)» 追記

Masa's blog

検索キーワード:

2009年06月04日 request_module[net-pf-10]: waitpid(3788,...) failed, errno 1 (その2)

_ request_module[net-pf-10]: waitpid(3788,...) failed, errno 1 (その2)

カーネル再構築でもメッセージは消えなかった。その後 /etc/modprobe.conf に

install ipv6 /sbin/modprobe -n -i ipv6

を記述する方法も試したが効果無し。

_ sendmailに関係する?

その後、/var/log/messagesと/var/log/syslogを同時にtail -fで表示させて観察していると、どうやら外部からメールが到着してsendmailにキックがかかると、上記のエラーが発生しているらしいことを発見した。


2017年06月04日 Version up php-5.5.11 to php-7.1.5

_ Version up php-5.5.11 to php-7.1.5

Build

$ tar xvf php-7.1.5.tar.bz2
$ cd php-7.1.5
$ cat ../php-7.1.5.diff | patch -p0
*** ./configure.ORG     2017-06-04 10:50:30.000000000 +0900
--- ./configure 2017-06-04 10:55:11.000000000 +0900
***************
*** 79826,79832 ****
  ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
 "
  if test "x$ac_cv_have_decl_isnan" = xyes; then :
!   ac_have_decl=1
  else
    ac_have_decl=0
  fi
--- 79826,79832 ----
  ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
 "
  if test "x$ac_cv_have_decl_isnan" = xyes; then :
!   ac_have_decl=0
  else
    ac_have_decl=0
  fi
***************
*** 79837,79843 ****
  ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
 "
  if test "x$ac_cv_have_decl_isinf" = xyes; then :
!   ac_have_decl=1
  else
    ac_have_decl=0
  fi
--- 79837,79843 ----
  ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
 "
  if test "x$ac_cv_have_decl_isinf" = xyes; then :
!   ac_have_decl=0
  else
    ac_have_decl=0
  fi
***************
*** 95505,95511 ****
  ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
 "
  if test "x$ac_cv_have_decl_isfinite" = xyes; then :
!   ac_have_decl=1
  else
    ac_have_decl=0
  fi
--- 95505,95511 ----
  ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
 "
  if test "x$ac_cv_have_decl_isfinite" = xyes; then :
!   ac_have_decl=0
  else
    ac_have_decl=0
  fi
***************
*** 95516,95522 ****
  ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
 "
  if test "x$ac_cv_have_decl_isnan" = xyes; then :
!   ac_have_decl=1
  else
    ac_have_decl=0
  fi
--- 95516,95522 ----
  ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
 "
  if test "x$ac_cv_have_decl_isnan" = xyes; then :
!   ac_have_decl=0
  else
    ac_have_decl=0
  fi
***************
*** 95527,95533 ****
  ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
 "
  if test "x$ac_cv_have_decl_isinf" = xyes; then :
!   ac_have_decl=1
  else
    ac_have_decl=0
  fi
--- 95527,95533 ----
  ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
 "
  if test "x$ac_cv_have_decl_isinf" = xyes; then :
!   ac_have_decl=0
  else
    ac_have_decl=0
  fi
$ ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysqli=mysqlnd --with-gd --with-zlib --with-bz2 --with-openssl=/usr/local/ssl
$ make
$ su
# make install && ldconfig
# cp php.ini-development /usr/local/lib/php7.ini
# vim /usr/local/lib/php7.ini
# cd /usr/local/lib
# rm php.ini
# ln -s php7.ini php.ini

_ After install php-7, apache got segfault

I have to remove line for old php5.

/usr/local/apache2/conf/httpd.conf

#DEL_LoadModule php5_module        modules/libphp5.so
LoadModule php7_module        modules/libphp7.so

2020年06月04日 Shell script to convert nega film to posi

_ nega2posi.sh - ネガフィルム画像をポジ画像に変換するシェルスクリプト(のつもり)

#! /bin/sh
trap "rm /tmp/nega2posi.$$.*.tmp.*; exit 1" INT TERM
#
if [ "X$1" = "X-h" -o "X$1" = "X--help" ]
then
	echo "Usage: $0 [-b X,Y] [-aw | -w X,Y] [-i input] [-o output]"
	echo "Convert input(nega film) to output(posi)."
        echo ""
	echo "-b X,Y              Specify position of black."
	echo "-aw                 Adjust white balance automatically."
	echo "-w X,Y              Specify position of white and adjust white balance."
	echo "-i input            If this option is omitted or - is specified, stdin is assumed."
	echo "-o output           If this option is omitted or - is specified, stdout is assumed."
        exit 0
fi
#
AutoWhiteSw="n"
white=""
black=""
input="-"
output="-"
#
while [ $# -ne 0 ]
do
	case $1 in
	-aw)
		AutoWhiteSw="y"
		;;
	-w)
		shift
		white=`echo $1 |\
		       tr ',' '+'`
		;;
	-b)
		shift
		black=`echo $1 |\
		       tr ',' '+'`
		;;
	-i)
		shift
		input="$1"
		;;
	-o)
		shift
		output="$1"
		;;
	esac
	shift
done
#
if [ "X${black}" = "X" ]
then
	convert ${input} txt: >/tmp/nega2posi.$$.3.tmp.txt
	darkestXYC=`cat /tmp/nega2posi.$$.3.tmp.txt |\
		egrep -v '^#' |\
		tr ',:()' '    ' |\
		tr -s ' ' |\
		awk 'BEGIN{
			FS=" ";
		}
		{
			printf("%d %d %d\n",$1,$2,($3+$4+$4));
		}
		END{
		}' |\
		sort -t ' ' -k 3,3nr |\
		head -1`
	x=`echo ${darkestXYC} | cut -d ' ' -f 1`
	y=`echo ${darkestXYC} | cut -d ' ' -f 2`
	black="${x}+${y}"
fi
#
if [ "X${AutoWhiteSw}" = "Xy" ]
then
	if [ ! -r /tmp/nega2posi.$$.3.tmp.txt ]
	then
		convert ${input} txt: >/tmp/nega2posi.$$.3.tmp.txt
	fi
	brightestXYC=`cat /tmp/nega2posi.$$.3.tmp.txt |\
		egrep -v '^#' |\
		tr ',:()' '    ' |\
		tr -s ' ' |\
		awk 'BEGIN{
			FS=" ";
		}
		{
			printf("%d %d %d\n",$1,$2,($3+$4+$4));
		}
		END{
		}' |\
		sort -t ' ' -k 3,3n |\
		head -1`
	x=`echo ${brightestXYC} | cut -d ' ' -f 1`
	y=`echo ${brightestXYC} | cut -d ' ' -f 2`
	white="${x}+${y}"
fi
#
convert +repage ${input} /tmp/nega2posi.$$.1.tmp.png
size=`convert /tmp/nega2posi.$$.1.tmp.png -format "%wx%h" info:`
convert +repage /tmp/nega2posi.$$.1.tmp.png -crop 1x1+${black} -resize ${size}! -negate -strip /tmp/nega2posi.$$.2.tmp.png
convert +repage /tmp/nega2posi.$$.1.tmp.png /tmp/nega2posi.$$.2.tmp.png \
	-compose blend -composite -negate -equalize /tmp/nega2posi.$$.4.tmp.png
#	-compose blend -composite -negate -auto-level ${output}
#	-compose blend -composite -negate -normalize ${output}
#
if [ "X${white}" = "X" ]
then
	convert +repage /tmp/nega2posi.$$.4.tmp.png ${output}
else
	convert +repage /tmp/nega2posi.$$.4.tmp.png -crop 1x1+${white} -resize ${size}! -negate -strip /tmp/nega2posi.$$.5.tmp.png
	convert +repage /tmp/nega2posi.$$.4.tmp.png /tmp/nega2posi.$$.5.tmp.png \
		-compose blend -composite -equalize ${output}
#		-compose blend -composite -auto-level ${output}
#		-compose blend -composite -normalize ${output}
fi
#
rm /tmp/nega2posi.$$.*.tmp.*