Alex Crichton helped me figure out a solution:
use std::io::Command;
use std::os;
use std::io::timer::sleep;
fn main() {
let args = os::args();
if args.len() == 1 {
let child = Command::new(args.get(0).as_slice())
.arg(child)
.detached().spawn().unwrap();
Sure, traditional deamons don't have stdio.
You will need to write to a log file and then also care about how that
file is being rotated etc. Traditionally daemons have a signal handle
that execution reopening of logs... You will also need to write an
init script to actually start it.
What I
You shouldn't return a BoxT unless you have to: box does placement
new, so by not doing it yourself, you give them options:
struct Point {
x: int,
y: int,
}
impl Point {
fn bad_new() - BoxPoint {
box Point { x: 1, y: 1 }
}
fn good_new() - Point {
Point { x:
On 2014-07-15, at 13:51 , Steve Klabnik st...@steveklabnik.com wrote:
let z = box(std::gc::Gc) Point::good_new(); // this is a GcPoint,
with no copy.
}
Unless that's changed in 0.11, IIRC that should be box(std::gc::GC).
Which remains weird and annoying, is there any plan to drop the
Whoops, yes, it was just a typo.
___
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev
On Tue, Jul 15, 2014 at 5:25 AM, Christoph Husse
thesaint1...@googlemail.com wrote:
Further I notices that they often seem to mix test and production code
which is also strange to me. For instance with test driven development
you have tons of problems with that approach. Only mentioning a
Hello Oxidizers!
I'm pleased to announce the next Bay Area Rust Meetup on Thursday July 31,
2014, at Hack Reactor in San Francisco. Sign up here to attend:
http://www.meetup.com/Rust-Bay-Area/events/181256992/
This meetups theme is based on the amazing work at building Rust's web