Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent the possible multiple recording instances from starting #407

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

matteius
Copy link
Contributor

@matteius matteius commented Jan 3, 2025

Latest build earlier and after restarting device, I notice the fstab entry I have to mount the smb share must not work until after network comes up, so I have to manually run mount -a which lead to me discovering somehow I had 3 record processes running and it was corrupting the recordings. Reducing down to 1 fixed it, and here is a fix to prevent it from even being possible.

root@ing-wyze-c3-acb2 ~# /etc/init.d/S96record start
Starting record: OK
root@ing-wyze-c3-acb2 ~# /etc/init.d/S96record start
Starting record: Another instance of the record script is already running (PID: 31839).
root@ing-wyze-c3-acb2 ~# /etc/init.d/S96record stop
Stopping record: Stopping process with PID 31839.  Process will end after next recording interval concludes.
root@ing-wyze-c3-acb2 ~# /etc/init.d/S96record start
Starting record: Another instance of the record script is already running (PID: 31839).
root@ing-wyze-c3-acb2 ~# ls /tmp/
alloc_manager_info   continuous_mem_info  isp_tuning_func      notify.log           onvif.log            record.lock          snapshot.jpg         vbuffer.tmp          wsd.log
colormode.txt        ircutmode.txt        nightmode.txt        ntp.conf             record.31839         resolv.conf          vbuffer.mov          webui.log
root@ing-wyze-c3-acb2 ~# ps | grep record
 2296 root      1876 S    grep record
31839 root      1904 S    {record} /bin/sh /sbin/record
root@ing-wyze-c3-acb2 ~# ps | grep record
 4315 root      1876 S    grep record
root@ing-wyze-c3-acb2 ~# ls /tmp/
alloc_manager_info   continuous_mem_info  isp_tuning_func      notify.log           onvif.log            snapshot.jpg         vbuffer.tmp          wsd.log
colormode.txt        ircutmode.txt        nightmode.txt        ntp.conf             resolv.conf          vbuffer.mov          webui.log
root@ing-wyze-c3-acb2 ~# /etc/init.d/S96record start
Starting record: OK

@themactep
Copy link
Owner

Each recording process writes to its own file. You can have them running as many as resources permit as long as they use unique target file names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants