Posts

Showing posts from October 8, 2018

/sbin/shutdown -h now; not working in crontab

Image
Clash Royale CLAN TAG #URR8PPP up vote 0 down vote favorite I've made a script to update and upgrade at 12.15 every Friday and after both of these jobs have been completed shut down. The updates work fine, however it does not shut down afterwards. I've tried to look it up and used the suggestions that I could find so far, but it doesn't seem to do anything, this is my script: #crontab #minute(s) hour(s) day(s) month(s) weekday(s) command(s) 15 12 * * 5 (/usr/bin/apt-get -y update; /usr/bin/apt-get -y upgrade; /usr/bin/touch /home/pi/cron_output.log;) 2>&1 >> /home/pi/cron_output.log; /sbin/shutdown -h now; The /sbin/shutdown -h now; part appears to not be working and I have no clue on how to fix it I'm running this on a raspberry pi. cron shutdown share | improve this question asked yesterday Joeri 1 1 New contributor Joeri is a new contributor to this site. Take care in asking for clarification, commenting, and

When do we jump into kernel part of our process virtual memory other than when we use system calls? (In Linux)

Image
Clash Royale CLAN TAG #URR8PPP up vote 2 down vote favorite This is a follow up question from my previous question. Based on the answer, a system call is an example of when we jump into kernel part of virtual memory of our process. What are other examples of a normal process (non kernel) using this part of virtual memory other than system calls? like is there any function call that directly jumps into this kernel part or..? When we jump into this section of memory, does the processor automatically set the kernel mode bit to 1 in order for our process to access this part or there is no need to set this bit? Does all of the execution inside of this kernel part happen without any need for context switching to a kernel process? (I didn't want to ask these follow up questions on comments so I opened another thread.) linux kernel memory virtual-memory share | improve this question edited 22 hours ago Stephen Kitt 149k 23 332 399 asked yesterday