rharder / imagesnap

Capture Images from the Command Line
https://github.com/rharder/imagesnap
458 stars 50 forks source link

Causes kernel panic if run rapidly as background task #7

Closed zacstewart closed 10 years ago

zacstewart commented 10 years ago

I have a gitshot file in my bin that looks like this:

#!/usr/bin/env sh
imagesnap -q -w 3 "$HOME/.gitshots/$(date -j -f "%a %b %d %T %Z %Y" "`date`" "+%s").jpg"

with a post-commit hook like

#!/bin/sh

gitshot

rebases can take forever. To prevent it from blocking I ran gitshot in the background like so:

nohup gitshot &>/dev/null &

This caused the camera light to flicker and then the system to kernel panic with the light stuck on.

aw commented 10 years ago

I'm not familiar with gitshot, but it seems like you're doing it wrong.

If your rebase runs imagesnap concurrently, there's a possibility your computer will explode.

Perhaps you can disable taking snapshots on rebase and limit that to regular commits?

zacstewart commented 10 years ago

If your rebase runs imagesnap concurrently, there's a possibility your computer will explode.

Yeah, that's what I'm seeing. Kernel panic. I'm just thinking that imagesnap should be capable of being run concurrently. It should be able to wait until it has a lock on the camera or something.

aw commented 10 years ago

No. That makes no sense.