Re: Running 310.locate in background without nohup

From: Tai-hwa Liang <avatar_at_mmlab.cse.yzu.edu.tw>
Date: Fri, 20 Aug 2004 11:17:54 +0800 (CST)
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.
Received on Fri Aug 20 2004 - 01:17:57 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:07 UTC