From owner-freebsd-current@FreeBSD.ORG Fri Aug 20 03:17:57 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1742416A4CE for ; Fri, 20 Aug 2004 03:17:57 +0000 (GMT) Received: from www.mmlab.cse.yzu.edu.tw (www.mmlab.cse.yzu.edu.tw [140.138.145.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E80543D58 for ; Fri, 20 Aug 2004 03:17:56 +0000 (GMT) (envelope-from avatar@mmlab.cse.yzu.edu.tw) Received: by www.mmlab.cse.yzu.edu.tw (qmail, from userid 1000) id 032ED4EFCD8; Fri, 20 Aug 2004 11:17:54 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by www.mmlab.cse.yzu.edu.tw (qmail) with ESMTP id F41874EFCD1; Fri, 20 Aug 2004 11:17:54 +0800 (CST) Date: Fri, 20 Aug 2004 11:17:54 +0800 (CST) From: Tai-hwa Liang To: Doug White In-Reply-To: <20040819190758.N66276@carver.gumbysoft.com> Message-ID: <04082011111518.21088@www.mmlab.cse.yzu.edu.tw> References: <0408192303483.15081@www.mmlab.cse.yzu.edu.tw> <20040819190758.N66276@carver.gumbysoft.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-current@freebsd.org Subject: Re: Running 310.locate in background without nohup X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2004 03:17:57 -0000 On Thu, 19 Aug 2004, Doug White wrote: > On Thu, 19 Aug 2004, Tai-hwa Liang wrote: > > Hello, > > > > It looks like invoking background /etc/periodic/weekly/310.locate from > > csh/tcsh then press ENTER before the job completes always failed on my > > -CURRENT box(without /var/db/locate.database being updated). Adding a > > "nohup" before the command seems to fix this problem. Since this never > > happen in -STABLE, I'm wondering about whether it's a feature or a bug? > > Can you run it with sh -x and see exactly what part of the script wigs out > with the carriage return? No problem: rtfm /root# sh -x /etc/periodic/weekly/310.locate & [1] 17762 rtfm /root# + [ -r /etc/defaults/periodic.conf ] + . /etc/defaults/periodic.conf + periodic_conf_files=/etc/periodic.conf /etc/periodic.conf.local + local_periodic=/usr/local/etc/periodic /usr/X11R6/etc/periodic + daily_output=root + daily_show_success=YES + daily_show_info=YES + daily_show_badconfig=NO + daily_clean_disks_enable=NO + daily_clean_disks_files=[#,]* .#* a.out *.core *.CKP .emacs_[0-9]* + daily_clean_disks_days=3 + daily_clean_disks_verbose=YES + daily_clean_tmps_enable=NO + daily_clean_tmps_dirs=/tmp + daily_clean_tmps_days=3 + daily_clean_tmps_ignore=.X*-lock quota.user quota.group + daily_clean_tmps_verbose=YES + daily_clean_preserve_enable=YES + daily_clean_preserve_days=7 + daily_clean_preserve_verbose=YES + daily_clean_msgs_enable=YES + daily_clean_msgs_days= + daily_clean_rwho_enable=YES + daily_clean_rwho_days=7 + daily_clean_rwho_verbose=YES + daily_clean_hoststat_enable=YES + daily_backup_passwd_enable=YES + daily_backup_aliases_enable=YES + daily_calendar_enable=NO + daily_accounting_enable=YES + daily_accounting_compress=NO + daily_accounting_flags=-q + daily_accounting_save=3 + daily_news_expire_enable=YES + daily_status_disks_enable=YES + daily_status_disks_df_flags=-k -t nonfs + daily_status_ata_raid_enable=NO + daily_status_network_enable=YES + daily_status_network_usedns=YES + daily_status_rwho_enable=YES + daily_status_mailq_enable=YES + daily_status_mailq_shorten=NO + daily_status_include_submit_mailq=YES + daily_status_security_enable=YES + daily_status_mail_rejects_enable=YES + daily_status_mail_rejects_logs=3 + daily_status_named_enable=YES + daily_status_named_usedns=YES + daily_queuerun_enable=YES + daily_submit_queuerun=YES + daily_local=/etc/daily.local + daily_status_security_inline=NO + daily_status_security_output=root + daily_status_security_noamd=NO + daily_status_security_logdir=/var/log + daily_status_security_chksetuid_enable=YES + daily_status_security_chkmounts_enable=YES + daily_status_security_chkuid0_enable=YES + daily_status_security_passwdless_enable=YES + daily_status_security_ipfwdenied_enable=YES + daily_status_security_ipfdenied_enable=YES + daily_status_security_ipfwlimit_enable=YES + daily_status_security_ip6fwdenied_enable=YES + daily_status_security_ipf6denied_enable=YES + daily_status_security_ip6fwlimit_enable=YES + daily_status_security_kernelmsg_enable=YES + daily_status_security_loginfail_enable=YES + daily_status_security_tcpwrap_enable=YES + weekly_output=root + weekly_show_success=YES + weekly_show_info=YES + weekly_show_badconfig=NO + weekly_clean_kvmdb_enable=YES + weekly_clean_kvmdb_days=7 + weekly_clean_kvmdb_verbose=YES + weekly_locate_enable=YES + weekly_whatis_enable=YES + weekly_catman_enable=NO + weekly_noid_enable=NO + weekly_noid_dirs=/ + weekly_status_pkg_enable=NO + pkg_version=pkg_version + pkg_version_index=/usr/ports/INDEX-5 + weekly_local=/etc/weekly.local + monthly_output=root + monthly_show_success=YES + monthly_show_info=YES + monthly_show_badconfig=NO + monthly_accounting_enable=YES + monthly_local=/etc/monthly.local + [ -z ] + source_periodic_confs_defined=yes + source_periodic_confs + local i sourced_files + sourced_files=:/etc/periodic.conf: + [ -r /etc/periodic.conf ] + sourced_files=:/etc/periodic.conf::/etc/periodic.conf.local: + [ -r /etc/periodic.conf.local ] + echo + echo Rebuilding locate database: Rebuilding locate database: + locdb=/var/db/locate.database + touch /var/db/locate.database + rc=0 + chown nobody /var/db/locate.database + chmod 644 /var/db/locate.database + cd / + nice -5 su -fm nobody + echo /usr/libexec/locate.updatedb + chmod 444 /var/db/locate.database rtfm /root# [1] Hangup sh -x /etc/periodic/weekly/310.locate rtfm /root# rtfm /root# rmdir: /tmp/locateRGQ1mBSGXm/mklocatetwxEPyeGqN: No such file or directory Hangup rmdir: /tmp/locateRGQ1mBSGXm: No such file or directory rtfm /root# It looks like it stuck at: "echo /usr/libexec/locate.updatedb | nice -5 su -fm nobody || rc=3" However, I still have no idea about why the sub shell hungup with a RETURN in my working shell.